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.