I have two magnetic door and window sensors, which I want to use to turn on my hall lights at sunset when either door is opened. It doesn’t work. What did I do wrong?
I think what you are intending is for lights to turn on during evening or all night.
I would suggest a range such as sunset to sunrise and set it as a precondition. Or whatever time range suits your needs.
with your current set up… the lights will only come one if you open the door at sunset only which the chances are slim to none that would occur.
Thank you, that did the trick.
You have sunset as a trigger. So, in order for this automation to work, you need to have a door open at precisely sunset. Change the sunset to a precondition and make it a range of sunset to sunrise.
Just for clarity, if ‘have a door open at precisely sunset’ means that at precisely sunset one or more of the doors had already previously been opened then yes. Sunset will be the trigger event and the conditions will evaluate as true.
If, however, it is meant to imply that one or more of the doors has to be opened at the exact moment of sunset then no. Only one trigger event is happening at a time. If the door opening gets there first (and it can be by a fraction of a second or it can be by days) then the lights come on. If the sunset happens while both doors are closed, then nothing happens.