Hello! I’ve been learning how to use Home Assistant (via Hass.io) automations for a few weeks now, but I cannot seem to figure out how to get two related automations to coexist properly.
Each day, I have an automation that turns on my outside smart lights 15 minutes before sunset. It works perfectly, by itself. I also have another one that turns the same lights off before sunrise, but logically I’m considering these one thing.
I also have a separate automation that manages the colors of my outside lights that is holiday-specific. Most of the time the lights are just white (this automation is not in use for that), but when holiday seasons roll around, I like to have a little fun for the kids. The one I’m trying to get working now is for Halloween. It uses a time pattern to shift the lights back and forth between green and purple every six seconds. I’ve created two scenes that it just swaps back and forth between.
In the Halloween automation, I have a condition that the outside lights must be on for it to trigger. My initial assumption was that the condition would be checked when the time pattern trigger hit, and if the condition was false, the automation wouldn’t do anything. Then, the next time the trigger hit, it would check again. I have since learned, through experience, that my assumption is not accurate. If I turn that automation on when the lights are off, it never fires after I turn the lights on. If the lights are on when I turn the Halloween one on, it will turn the lights back on if I turn them off.
What I would like to do is to have my outside light automations do their things, and if I want to enable Halloween lights, I simply go into the web UI and turn that automation on. It would fire every six seconds after the sunset automation runs, and then once the sunrise automation turns the lights off, it would stop. To do that, I think I need to understand better how and when the conditions in a given automation are evaluated. Is it possible to force it to recheck that every time the time pattern hits? Or is it just a one-time evaluation when the automation is activated?
For the record, I’ve already set the sunrise and sunset automations to turn off and on, respectively, the Halloween automation. This requires me to change those automations and reload, though, rather than just quickly toggle something from the UI. It seems like this shouldn’t require quite that much effort to get working, but maybe that really is my best option.
Hopefully my rambling makes sense, but I’ll be happy to clarify anything that doesn’t. Thanks for your help!