Can someone please explain "time periods" and how to do 24x7 room lighting?

So you can't really do an AND for the turn off because of how the system is event driven. Consider this scenario: You open the door intending to go into the basement. You open it about a foot when for whatever reason, you decide "I don't want to go into this room after all" so you shut the door.

The light will turn on when you open the door from the contact sensor but if the turn off is an AND they will never turn off. We are going to assume you did not go into room far enough to trigger the motion sensor. The part of the off trigger that matters most is the becomes inactive. If the motion was never active, it cannot become inactive. So these lights would stay on.

What you can do is this.

That doesn't give you the two separate timers, but there is a way around that too. You could use a hub variable. In fact, this nearly exact same scenario is why I made a feature request to have this added a while back and Bruce was nice enough to put it in.

What you'd need to do is create a variable called something like BaseCabLightTime. Create a new rule in rule machine with the logic you want to set the variable time. Then in the means to turn off you'd select variable elapsed time as the means to turn off.

2 Likes