I have an automation set to turn on my porch lights at 05:30 and at sunset in the evening, and turn off the porch lights at sunrise in the morning and at 22:00. Four different trigger IDs, two actions (each action handles two trigger IDs). The turn on action works fine for both trigger IDs, but the turn off action only works for the 22:00 time trigger. The log shows the automation runs at sunrise, but oddly the log for the porch lights shows the lights got turned off then immediately turned back on as a result of a turn on action, no trace of the automation triggering them.
This automation worked last week, when I was using the Hue hub to control the lights. It seemed to stop working when I switched over to the ZBT-2 hub. I’m skeptical this has anything to do with it but it did occur around the same time, so just thought to mention it. Hope somebody can help me out.
I don’t see anything in the automation that would explain that. I do find the timestamp in that trace a bit confusing… 11:30 am is quite late for a sunrise… are you in Antarctica or is there something wrong with your system time?
@Sir_Goodenough, the sunrise trigger occurring given the log for the automation, but the action it’s supposed to be taking at that trigger (turn off the porch lights) does not appear to occur (even though it works correctly for the 2200 time trigger). Something occurs at the same time at the trigger (see porch light history in screenshot), but it doesn’t correspond to the action defined in the automation.
@Didgeridrew I have my timezone set to Eastern Time (America/New_York) in the system settings, and all of my automations refer to local time and function as expected (with the exception of the one in question here), but various things in the UI are showing GMT time for whatever reason. Doesn’t bother me that much so I haven’t bothered to investigate. Also you’re right about the “or” conditions, I didn’t realize when I was setting this up that you could select multiple triggers in the triggered by condition, then forgot to remove the “or” condition wrapping the “triggered by” condition.
Perhaps the names you’re using for the trigger ids sunrise and sunset are causing problems? I avoid using keywords as labels/ids. Try something like: id_sunrise and id_sunset as id’s.
@OldSurferDude I tried changing the trigger ID, unfortunately no luck. Still failed to turn off this morning.
@Troon the web UI is showing UTC time. This appears to be due to privacy.resistFingerprinting set to true in Mullvad browser. My browser informs sites that my timezone is UTC time.
I’ve seen a few threads on this forum where blocking fingerprinting messed up time & location specific automations. Search around here for “fingerprint” & see if other people’s issues match your own.
Most search results for “fingerprint” are related to locks with fingerprint readers. The only topic that’s vaguely similar is this, but again that seems to only affect times in the Web UI. The screenshot in my original post shows the trigger fired correctly (even though the time is in UTC time, I can confirm it does actually fire at the correct local time), it’s just the action for that specific trigger ID that has issues (doesn’t reflect the action defined in the automation).
I re-wrote your automation and separated the choose choices. I agree that this shouldn’t change anything, but stranger things …
I had another concern about the trigger_id;s. Most examples I saw had single or double quotes around the id’s. I looked at where I use id’s and I don’t use quotes.
I regenerated the entity IDs for the three Hue bulbs that make up the Porch light group and deleted/recreated the Porch group with a new entity ID as well and now the original automation is working as expected. I suspect I have something stale in my HA DB after deleting the Hue lights from the Hue integration and adding them to the ZBHA integration that is at issue here.
Actually I think this may be due to HASS Circadian Lighting. When I re-added the new porch light entity ID to the HASS Circadian Lighting configuration yesterday evening, the automation is back to being broken today. Will remove from the circadian lighting configuration again today and see what happens tomorrow.