Unable to delete a ZHA device

Tags: #<Tag:0x00007f328595d828>

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

1 Like

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.