I am trying to Toggle a lamp if Variable Container switches to 1 and then set the variable container back to zero.
I am trying:
ToggleLightOn = (ToggleFlag==1) AND LightOff
ToggleLightOff = (ToggleFlag==1) AND LightOn
either of the above work on their own… However, I am using PLEG to (a) flip the light and (b) change the Variable Container change ToggleFlag’s state to zero. The time that it takes to (b) creates a condition where both ToggleOn and ToggleOff are true and it bounces.
I tried to put some time in there:
ToggleLightOn = ToggleFlag AND LightOff AND (LightOff;NOW>1:00)
ToggleLightOff = ToggleFlag AND LightOn AND (LightOn;NOW>1:00)
Doesn’t work.
Any suggestions on toggling from a Variable container flag and updating the flag?