Pausing a piston using a simulated switch


#1

1) Give a description of the problem
Trying to get a piston to “pause” when a simulated switch is ON, but function normally if the same simulated switch is OFF.

2) What is the expected behavior?
If simulated switch is ON, piston will not turn off the light. If simulated switch is OFF, piston will execute normally.

3) What is happening/not happening?
If the simulated switch is turned on before any conditions are met (motion inactive timer hasn’t started and light is off), then the piston is not executing (which is the desired result).
But if a condition is already met (motion inactive timer has started or light is already on), and then the switch is turned on… the piston still executes.

4) Post a Green Snapshot of the piston!


“switch 9” is the simulated switch. “switch 4” is the light.

I do have “always subscribe” set on both IF conditions, if that matters. Do I need to move the simulated switch into the IF statement with “always subscribe” vs in the restriction section?


#2

I moved the simulated switch into the IF statement instead of as a restriction and it seems to have done the trick. Now the piston will “pause” no matter when I turn on the simulated switch, even if it’s 2 seconds before the timer ends.