Actions when light turned off and door is open

Hi Richard,

I am trying to do something. I want that when I turn a light switch off, if a door is open, to turn another light switch off too. This condition has to be satisfied whenever the door was open before, but to become true always, as long as the door remains open, but I don’t want it to fire if the light is already off and the door is opened. I am trying to do this withe a sequence, but it works only the first time that I turn off the light if the door is open, but if I turn on the light again and turn it off again, it won’t fire.

door_open door sensor is tripped
light_off light switch is off


Thank you in advance.

There is a new feature in version 4.5
Rename the condition to have an underscore as the first character of the name.
In that case … it will fire the actions every time the condition evaluates to true, not just the first time.

Richard, I did that and I dont know why, but it also runs the actions when I turn the light on, it only run them when I turn them off.

That’s because sequence expressions do not care about the CURRENT value of the elements of the sequence expressions … only the order of the time stamps.

If you want then to be true as well … you need to and in the appropriate variables.