I have an automation I have set up for sunset. And it does trigger at sunset, but then it triggers the next day at noon, specifically 12:04PM. Has anyone seen this before? I am triggering two Insteon devices/ But only the one turns on at 12:04PM.
Seems like odd behaviour, have you checked that your home assistant location is set correctly (Settings > General).
If you post the YAML for your automation it would be possible for people here to check there isn’t some unintended trigger in the automation (when viewing your automation, the 3 dot menu in the very top right, edit in yaml). You might be able to get a clue to what is happing by looking at the automation traces too.
alias: Front Lights On
description: Front lights come on at sunset
trigger:
- platform: sun
event: sunset
offset: "00:15:00"
condition: []
action:
- type: turn_on
device_id: d8c7211d52a4f9a0a0c71869d0134a9b
entity_id: switch.icon_appliance_module_09_a5_4b
domain: switch
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- type: turn_on
device_id: 72fc5545233c1eaf928b4a0d488a1092
entity_id: light.switchlinc_dimmer_41_b7_42
domain: light
brightness_pct: 100
mode: single
Your automation contains actions to turn off a switch and a light. In your first post you said:
Which one, the switch or the light?
After today, none of them are working. They work manually but the above automation does nothing. And I’m confident I have my location correct now. Any suggestions?
Copy-paste the following template into the Template Editor and confirm the reported time represents sunset for your area.
{{ (state_attr('sun.sun', 'next_setting') | as_datetime | as_local).time() }}
Time was way off, so I mucked around with the zone settings and it seems to be working now.
Originally you said:
I’m confident I have my location correct now
After the template I suggested you use demonstrated your local sunset time was incorrect, you stated:
so I mucked around with the zone settings
So what was the original time zone setting (that you were confident was correct) and the new time zone that produces a correct sunset time?