pleg one shot

I am trying to create a condition that looks at a property of a virtual switch. If the switch is on then do the actions. However I only want those actions to fire if the switch goes from an off state to an on state. What is happening now is: If I change lighting levels manually at the switch and the property of the virtual switch is still on, then it will in a few moments revert the lighting from what I set it to, to the level defined in the action. Said another way…I want the system to do actions once upon the change of a v switch, and then no more unless the v switch goes off then back on again. In crestron programming this was called a one shot. Does such a device exists with pleg? Thanks.

Depending on your logic there are two techniques to do this.

  1. Leave the REPEATS flag OFF, the actions will only run when the condition goes from true to false.
  2. Use the sequence expression.
    i.e.
    ConditionMinusVSwitch Switch1 or Switch2 or Switch3
    ConditionwithVSwitch VSwitch and ConditionMinusVSwitch and (!ConditionMinusVSwitch; VSwitch; ConditionMinusVSwitch)

The last part (the sequence expression) will only be true if all three parts become true in the specified order.

[quote=“RichardTSchaefer, post:2, topic:197976”]Depending on your logic there are two techniques to do this.

  1. Leave the REPEATS flag OFF, the actions will only run when the condition goes from true to false.
  2. Use the sequence expression.
    i.e.
    ConditionMinusVSwitch Switch1 or Switch2 or Switch3
    ConditionwithVSwitch VSwitch and ConditionMinusVSwitch and (!ConditionMinusVSwitch; VSwitch; ConditionMinusVSwitch)

The last part (the sequence expression) will only be true if all three parts become true in the specified order.[/quote]

Thanks, I just realized my problem is the day or night switch. LUA restarts all the time. This is throwing the DorN off and it continually jumps from one or the other. PLEG is working as it should. I have had nothing but bugs out of this vera the entire time I have had it. Time to look into homeseer.