Turn Lights Off After Motion Unless


#1

1) Give a description of the problem
Lights will not turn off after variable is set to false

2) What is the expected behavior?
Hallway lights after motion is no longer detected should turn off, unless the lights in the other room have been turned on. After the lights in the other room are turned off, it should resume turning off the lights in the hallway after motion is no longer detected.

3) What is happening/not happening?
If the nursery action is triggered, the hallway lights won’t turn off, even if room lights have been turned off.!

4) Post a Green Snapshot of the piston!


#2

Resume turning off the lights? I don’t understand what you mean? Couldn’t you just turn the hallway lights off when the room lights are turned off? You can’t suspend turning off and then resume it. The function you are describing would be very complicated to write. You would have to use a while loop. But i don’t think you want to go through all of that. There are a lot easier ways to accomplish something workable. But if you really want that, look at some of the references around “while” loops.


#3

Hmm, need to set the programmatic back to true after you turn off nursery switch in the last IF.