Unable to Pair Ikea Motion Sensor - Database ID error

Hi All,

I’m trying to repair an Ikea Motion Sensor with Z2M but when I’m doing so, I’m getting the following error with Z2M crashing.

2024-01-02T11:19:50.892Z zigbee-herdsman:controller:log Device announce '0xdc8e95fffe357119'
Zigbee2MQTT:info  2024-01-02 11:19:50: MQTT publish: topic 'zigbee2mqtt/Living Room Light Switch', payload '{"brightness":63,"last_seen":"2024-01-02T11:19:50+00:00","linkquality":109,"power_on_behavior":null,"state":"OFF"}'
Zigbee2MQTT:info  2024-01-02 11:19:50: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Living Room Light Switch","ieee_address":"0xdc8e95fffe357119"},"type":"device_announce"}'
2024-01-02T11:19:50.966Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2024-01-02T11:19:51.077Z zigbee-herdsman:controller:device:log Interview - quirks check for 'undefined'-'undefined'-'Unknown'
2024-01-02T11:19:51.077Z zigbee-herdsman:controller:device:log Interview - quirks did not match
2024-01-02T11:19:51.077Z zigbee-herdsman:controller:device:log Interview - node descriptor request failed for '0x70ac08fffe971134', attempt 6
2024-01-02T11:19:51.077Z zigbee-herdsman:controller:device:log Interview - quirks check for 'undefined'-'undefined'-'Unknown'
2024-01-02T11:19:51.077Z zigbee-herdsman:controller:device:log Interview - quirks did not match
2024-01-02T11:19:51.126Z zigbee-herdsman:controller:device:log Interview - failed for device '0x70ac08fffe971134' with error 'Error: Interview failed because can not get node descriptor ('0x70ac08fffe971134')
    at Device.interviewInternal (/app/node_modules/zigbee-herdsman/src/controller/model/device.ts:598:19)
    at Device.interview (/app/node_modules/zigbee-herdsman/src/controller/model/device.ts:488:13)
    at Controller.onDeviceJoined (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:579:17)'
2024-01-02T11:19:51.126Z zigbee-herdsman:controller:error Interview failed for '0x70ac08fffe971134 with error 'Error: DatabaseEntry with ID '30' does not exist'
TypeError: Cannot read properties of undefined (reading 'resolveDefinition')
    at Controller.<anonymous> (/app/lib/zigbee.ts:89:26)
    at Controller.emit (node:events:517:28)
    at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:527:14)
    at Controller.onDeviceJoined (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:586:22)

Any ideas why this is happening and why it’s causing Z2M to stop working, and how I can resolve it?

Thanks