IKEA Tradfri Turned on by state_changed

A have a couple a Tradfri lights working via the normal integration and actually all work fine.
When I switch off the lights in the evening all lights go off as they should and this is also reflected by the icon on the dashboard.

Now every morning the ICON on the dashboard is showing me the lights are back on…while in reality all lights are still off.

In the logs I do find a event after my turn-off-command. Around 01:00 I noticed an event: Turned on by state_changed, so HA believes the lights are on. In reality I was sleeping, nobody touched any buttons (I hope ;)) and the lights are actually off.

Any clue?

I am seeing similar in a completely unrelated integration (iAquaLink). An automation turns the pool filter off

service: switch.turn_off
  entity_id: switch.production

The filter does turn off, but then Home Assistant gets its knickers in a knot and thinks it is on. :open_mouth:


Same issue. Happens when an automation to turn on my pool pump (Zwave) around 01.00.
I see the automation running, and history tells me it was indeed turned on, but immediately turned off:


As the schedule to turn on/off the pump is dynamic, I can’t really say how close to 01.00 I need to be to trigger this issue, I’ll try to find a pattern.

Was seeing exactly the same with an automation that sequentially turned off two zwave switches sequentially. Initially attributed to poorly reviewed ZW97 device, so added a GE device and only used one plug in the ZW97 - same problem - now in the GE device!

Switched back to both plugs in the ZW97 with a 10 second delay between switch.turn_off service calls which has worked through 15m of testing (never worked before). Certainly seems like a HA bug…

I never figured this out…meanwhile I switched from using the Trafri integration (with original) Ikea HUB to zigbee2mqtt. All automations and use-cases remained the same and never notices this issue after.

Maybe it has something to do with timing issues between HA and certain integrations? Something around 01:00. Maybe the system is busy will al lot of other things?

anyone figure this out? My outside light is triggered by a sunset offset, used to work great, and past few days I’ve been seeing this same behavior. Not sure what’s causing it though. Going to add a couple delays in the automation to see if that remediates.