New to Reactor

I want to have a light turn on when i opens the door, and turned of after closed. But only activate if the light is OFF while door is opened. Is this the way to go?:

Condition

“door” tripped IS TRUE
“DoorLight” target IS FALSE

Trip action

“Doorlight” Turn On or off 1

Untrip action
Delay 00:30 from start of actions
“Doorlight” Turn On or off 0

Please guide me :slight_smile:

hmmm, the way you have it now, the light will turn on if the door is open and the light is off, but it will not turn off because you are checking on the status of the light you just turned on. so when the door is opened and the light is turned on, the first condition will never evaluate to false unless someone turns the light off manually. What i would probably do is just remove the “DoorLight” status from the condition since sending an “on” command to a light that is already on really does nothing. so, if you just do:
Condition

“door” tripped IS TRUE

Trip action

“Doorlight” Turn On

Untrip action
Delay 00:30 from start of actions
“Doorlight” Turn off
Now, having said this, this will also shut off the light if someone manually turned it on and someone opens and closes the door…

Ahh your right!

Thank you