I am using modes to manage some lights and was having some issues when user activity did not match up with the timing of mode changes. So I added some motion sensors and am trying to work out the logic now.
I have 2 lights that I want to turn off when the mode switches to 'Home - 6 Night' unless there is motion in which case I want it to delay for 20 min of no motion and then turn off. That seems to be working with this ML rule where I have it disabled on my other home modes.
My logic question is what happens if motion was to end 21 min before the mode changed to 'Home - 6 Night'? Would the lights stay on until another motion active and 20 min delay (I think this would be the case) or would they turn off because it has been past the 20 min delay and the mode is no longer disabling the action?