Ikea lights turn on after becoming unavailable

I have a strange issue with my zha network and ikea bulbs. All my zigbee devices seem to be reporting they were unavailable momentarily around 3AM in the morning.

After they became unavailable, I have a zigbee group of 6 gu10 ikea lights which always turn on. Other bulbs stay in off state.

I also have some individual ikea lights not in groups and they stay off. I have non-ikea zigbee groups of lights and they start off too.

Any way I can fix this?

PS: I have now found out this may be due to the motion sensors in the room. These are ikea as well. They just stay in “detected” state after becoming unavailable until they detect motion and clear again.

If the Ikea motion sensor goes from unavailable to detected you could update your automation trigger so that it only triggers if the state goes from clear to detected. That would avoid them triggering when coming back from unavailable. You’ll still have an issue that the first motion in a room after the sensor being unavailable won’t be recognized though. I can’t think of a way to fix that if the Ikea motion sensor is going to report the way it does.

1 Like

Thanks for the suggestion. I looked into this and doesn’t look like an option I can use. I have 2 motion sensors in a group and am using the group to trigger motion on and off. Don’t have an option to recognise the clear> to >detected in the group.

If I change my automation to turn on with motion on 2 individual motion sensors from clear to detected, would it mean both have to detect motion or only one has to detect motion for this to trigger? If this works, I may have a partial solution. Still need to understand why it won’t change from detected to clear after becoming unavailable.

platform: state
entity_id:
  - binary_sensor.bathroom_motion_sensor_1_motion
  - binary_sensor.bathroom_motion_sensor_2_motion
to: "on"
id: motion
from: "off"

Triggers are independent, so if either motion sensor detected motion the automation would get fired.

this didn’t work. Even after setting clear>to>detected, it still turns on the lights. I think the lights themselves are coming into an on state without using automation as the recent turn on doesn’t show the automation anymore in the logs.

I have a reboot of the home assistant node scheduled at 3am daily. This unavailability is being caused every day after 1 to hours following reboot. I have disabled the reboot now. Hopefully this will resolve the issue.