Unable to delete a ZHA device

Hello,

I cannot remove a former tradfri switch from the device list. The switch is physically dead (RIP), so I cannot repair to remove it. I have no IEEE address to try a zha.delete

Do you have suggestions to remove this ? Edit the zigbee.db ?

I had similar issue and had to remove if from core.device_registry file, carefully (and took a back up first

2 Likes

Emphasis on carefully! I made the mistake of leaving a rogue ; in the file and it caused HA to not load the GUI. Luckily I could access the files via Samba and edit.

I suggest copy / pasting the contents into a JSON validator prior to saving your changes

That’s not the a Tradfri, that’s your coordinator (RaspBee)

What do you mean? The issue should be fixed on the raspbee?

I edited the JSON and the device is gone. :mechanical_arm:

Thanks!

No, that was your Raspbee/coordinator/PiHat/Zigbee shield. … Not a Tradfri at all, look at the lower lines in your original screenshot. It shouldn’t hurt anything with you manually taking it out, but it’s just a bit of a bug now that it gets marked as unavailable at all.

On all my devices it shows the coordinator’s name where it is shown above, this is an example of one of my devices

There is no option to remove device on the coordinator

For the record it was not the Raspbee shield but the remaining config of a tradfri switch…

Today, I got the same issue with a Blitzwolf PIR sensor, so I think there is a bug somewhere when a zha device is removed.

I encounter this removing any device from ZHA. It takes the info away and also the dialog to remove the deice but never actually removes the device. The tip on the device_registry edit clears it up.