Repairing Xiaomi temp sensor

Hi All,

I have a xiaomi temp-sensor in my bathroom. This device was working in my HA but I had to restore my instance from an older backup and now the sensor don’t want to pair anymore.

I checked devices.yaml, state.json and the database.db.
When I found the entity-id of the sensor I removed it.
I also changed with MQTT Explorer and removed any references to that entity-id.

I also replaced the battery but whatever I try it won’t pair… I don’t see it any where in my logs.
I also held the sensor 10 cm from the coordinator but that also doesn’t make it work

Its driving me crazy…

All my other sensors are working perfect. Another temp sensor is working perfectly. Also pairing new devices is working perfectly…

Hope someone has other suggestions what i can do.

kind regards

Install Zigbee2Mqttassistant and forcefully remove the device. Then pair again.

I did install that app and I don’t see it in there.
How can I forefully remove the device???

Ok, you don’t see it anymore.

From github :
Note that the coordinator/zigbee2mqtt cannot remove a device, it can only request a device to remove itself from the network (this is how removing in zigbee works). If the device doesn’t remove itself; it just cannot be removed from the network.

So if you still have an old database, restore that and try to remove again.

okay, I don’t have a backup of the DB…
I only have 10 devices, so I can remove database, mosquitto etc… and repair everything, or does the device still remember it…

how can i clear that memory ?

In case you want start from scratch, just change the pan_id and zigbee-herdsman will automatically cleanup the db.