Question. Is sunrise and sunset a one shot trigger or do they stay active high when in a sunset or sunrise state? It seems like it is a one shot. My problem is in my automation set up on the automations tab I have at sunset and if I’m home well “my phone” and its sunset, trigger a light to come on. The issue is if I’m not home at sunset it never triggers. Even if I come come after sunset time. Its like it only checks the state of if I’m home right at sunset. Not the whole duration of sunset.
Triggers are always events that happen at a moment in time. Even things like numeric state triggers only happen at the moment the value crosses the threshold. If you want an automation to run when you are at home at sunset OR when you arrive home then you need two triggers. Since you also want to STOP the automation from running in certain situations (if it’s sunset but you’re not home or if you arrive home, but it’s not after sunset yet), then you’ll also need conditions.
So your automation has two triggers:
- The moment the sun sets
- The event of you arriving at home
And two conditions
- It’s already after sunset
- You are currently at home
The first condition will always be true when the first trigger fires, and the second condition will always be true when the second trigger fires. However, the second condition will only sometimes be true when the first trigger fires and vice versa. This will achieve the result you are looking for.
If this isn’t quite clicking, then this video might help.
I think I get it now. Ill have to see how it works over the next couple days. Thanks