Home assistant keeps reporting the state of several lights wrongly after being switched by an automation.
I have 6 lights that are being switched by a simple automation that triggers after sunset and sunrise.
After sunset the lights are switched on by an automation, home assistant changes the state from “off” to “on” correctly, after sunrise another automation switches the lights off but home assistant keeps showing the lights as “on”. Even though the lights are physically off. If I manually switch the lights off the state is correct again.
Weird thing is that one of those six lights does not show this issue.
This is the sunset automation;
alias: Outside lights - switch on at sunset
description: ""
trigger:
- platform: sun
event: sunset
condition: []
action:
- type: turn_on
device_id: 828fda7378c7dd1aa353999264167360
entity_id: light.outside_lights_path
domain: light
brightness_pct: 85
- type: turn_on
device_id: bc36ff10eb8ca416cec50d31f6c9a41c
entity_id: light.outside_lights_front
domain: light
brightness_pct: 85
- type: turn_on
device_id: 170b2469e9b81e115e2f1a9c00d5f509
entity_id: light.outside_lights_driveway
domain: light
brightness_pct: 85
- type: turn_on
device_id: 09119ece5b928381dabe8bbf5895302a
entity_id: light.outside_lights_back
domain: light
brightness_pct: 85
mode: single
And this is the sunrise automation;
alias: Outside lights - switch off at sunrise
description: ""
trigger:
- platform: sun
event: sunrise
condition: []
action:
- type: turn_off
device_id: 828fda7378c7dd1aa353999264167360
entity_id: switch.outside_lights_path
domain: switch
- type: turn_off
device_id: bc36ff10eb8ca416cec50d31f6c9a41c
entity_id: switch.outside_lights_front
domain: switch
- type: turn_off
device_id: 170b2469e9b81e115e2f1a9c00d5f509
entity_id: switch.outside_lights_driveway
domain: switch
- type: turn_off
device_id: 09119ece5b928381dabe8bbf5895302a
entity_id: light.outside_lights_back
domain: light
mode: single
This issue does not affect the functionality of the lights, they physically switch on and off perfectly each day but it does mess up my dashboard making it an annoying issue.
Did anyone have this same issue and is there a solution?