#Hallway Lights

1 messages · Page 1 of 1 (latest)

eager crypt
#

I have a hallway with 3 lights. Right now they switch with the sensor light automation and have one IR-motion sensor.

Now I would like to add door sensors and switch the lights on one by one based on which door is open. So for example if the door on the left has opened and then the motion sensor triggers the light on the left should be switch on first then the middle one and so on.

gaunt crater
#

Could do the choose with trigger ids.

That way you have it trigger when The door opens abd the sensor is placed before the door the lights light up the path,

An choose option could be if then else statement like if the door is opened but then sensor is activated, the lights won’t turn on because someone is walking away from the lights

#

If sensor is active but door is closed, it still turns on the lights

eager crypt
#

I will tinker abit maybe i get a solution. Is there an option to have a condition like "door sensor has been activated in the last X seconds/minutes" ?

gaunt crater
#

I’m sure you can write a script that listens to last state

#

Then when that’s active it triggers

steep thicket
# eager crypt I will tinker abit maybe i get a solution. Is there an option to have a conditio...

You can use a state condition which, if you select a binary sensor for your entity, you’ll be able to set the for option for how long it had to be in that state.

However, if it had been in the detected state and went to the clear state, that condition won’t pass.

One alternative is to use a template condition, and you can just check to see if the motion sensor entity’s last_changed property is less than so many seconds old.