How to: IKEA Trådfri Motion Sensor with ZHA

You can with Homeassistant 0.113.0

I have the same problem with my xiaomi buttons. All is OK until I restart HA, and we all know how often we need to restart HA.
I found a workaround and posted it here (I use node red):

Thanks for this. I didn’t realise the device is still reporting, generating ZHA Events when they become unavailable in ZHA. I will try this the next time this happens. It is unavoidable with the amount of tweaking I do that needs HA restarts :slight_smile:
It’s great to have ZHA functionality baked into the Core HomeAssistant without needing to install additional addons. But lack of device support and issues like these make it difficult to use reliably.

After several hours of toying with the sensor and study what it is doing or can’t do, this code is the best I can find or come up with.

The lights will stay on as long as the motion sensor is in the on state. As long as you are in the area of the sensor and kinda moving around, the sensor will be in the on state. However, once the sensor detects no motion and switch to the off state, the lights will shut off after 30 sec. If you walk by when it is in the off state, the light will still shut off even though the motion sensor switch back to on.

This will lead to a long delay of turning on the lights because the sensor will start its 3 minute timer. The caveat is that you don’t want to walk by when the sensor has switched to the off state. Than you will need to avoid tripping the motion sensor for a solid 3 minutes.

Anyone found a better solution, please share.

So what you are saying : once the motion sensor has decided it sees no motion, then it will start it’s 3 minute timer ?

Well, not exactly. 3 minute timer starts once it is in the on state. However, if it detects motion between the 3 minutes, the sensor remains in the on state. How much minutes it adds I do not know. Once the sensor detects no motion, it will switch to the off state and the second automation will turn off the light after 30 secs.

I’ve physically test it by staying in the room for over 3 minutes, the light remains on for the duration of the time I was in there. Once I leave, the sensor will switch to off and lights shuts off in 30 secs.

Anyone have a solution - I have a Ikea motion sensor on ZHA - But it will not trigger any motion at all. It always stays no Motion and zha_event dosent give any info for it.

I’m having the same issue with the motion sensors in ZHA, found the device ok, named it correctly, but its not triggering. With a Tasmota flashed Sonoff bridge.

Ikea lights and Sonoff sensors seem to be working ok

Is there some other configuration that needs to be done?


EDIT; Deleted and readded, seems to work as it should now. Oh the Local Zigbee!

Does anyone know if the new sensor also send a detection when it’s set on day and it’s night? Since the button only let’s me select day or night and not day AND night.

“Day” must be “day AND night”.
IKEA intend “day” to be used when you need to turn on an associated light also during the day.
In my case I’m using it only for detection and it works like a charm in HA both during day and night.

1 Like

how did you get it working ? I am having the same issue now. Just got the sensor last evening from ikea and it is well paired with Sonoff however doesn’t detect any motion. any help ?