The motion sensor situation in the bedroom (one sensor on each side of the bed) is not satisfying. The sensors don’t cover the full area up to the door, which sometimes delays activating the night light (LED strips under the bed) when someone walks into the bedroom. As I said, not satisfying.
So far, I have two Aqara Motion Sensor P1 sensors installed, but I want to move away from Aqara. I grabbed a IKEA TRÅDFRI (E1745) from the shelf, and added the batteries. Pairing the device with Home Assistant (HA) was easy. Updating the firmware on the device was more work. But it was necessary, because the motion sensor with the old firmware did not reliably report motions in HA.

Installing the batteries
The box comes with two CR2032 batteries, but one has to open the sensor:
- Remove the cover on the back: there are two small openings on the long sides of the sensor. Insert a flat screwdriver into the openings and press gently, the cover will then pop off on its own.
- You’ll need a small Phillips-head screwdriver to open the battery compartment cover. There are two red LEDs next to the button, which indicate the current setting.
- This exposes the battery compartment. There are two slots there where you insert the batteries from the package. There are two red LEDs next to the button, which indicate the current setting.

Don’t put the screwdrivers aside, we’ll need them again in a few seconds.
Pairing the Zigbee Device
Pair the Zigbee device in Home Assistant. In my case, I’m using ZHA.
Before placing the back cover again, there are three buttons under the cover:
- The top side button - in the middle, with a symbol which looks like two rings - is the Pairing or Link button.
- The day/night buton - with a sun/moon symbol - toggles between triggering all day versus only in dark environments.
- The brightness button - with a brightness symbol - switches the default brightness level.

Bring your HA into pairing mode. Then quickly press the link button four times. A small red LED on the front starts blinking or glimming. After a few seconds, the device will show up on Home Assistant. Give it a name.
Firmware update
My device was sitting on the shelf for a while, and had an old firmware version installed: 0x20022623.
ZHA almost immediately notified me that a newer firmware version is available: 0x24040005
Unfortunately the old firmware also almost instantly sets the device into sleep mode, and sending a signal for a firmware update is not successful. It just times out.
After some playing around, I got the update working the following way:
- Open the battery cover on the TRÅDFRI again
- Pull both batteries
- Prepare the firmware update in ZHA: already have the update for the device open
- On a second screen or tab, restart the Zigbee pairing process in Home Assistant
- Insert both batteries into the TRÅDFRI
- Start the pairing process on the TRÅDFRI, by quickly pressing the link button four times
- Keep pressing this button every 2-3 seconds, this keeps the device awake
- The device re-appears on Home Assistant, confirm it
- Then on the other screen, start the firmware update again - while still tapping the link button every 2-3 seconds
Took me two attempts to get it right, but eventually the firmware update process started. At this point you can stop pressing the link button, the device will stay awake during the upgrade.
The update can easily take two to three hours. But afterwards the device reliably reports detected motion.