Unfortunately, the following topic:‘Delete individual device from integration’ has been closed, but with a mentioned resolution that doesn’t solve the initial problem. The solution mentioned is about deleting entities, not about deleting devices.
Problem:
When I connect an MQTT device to my MQTT broker, the device shows up in my MQTT integration because of my auto-discovery, no problems there. But if I want to remove an MQTT device from this integration, that is not possible. I can delete the entities which are listed under a device, but that won’t delete the device. I can delete all the MQTT messages (also retained ones) from that device in my MQTT broker, but that won’t delete the device.
Feature request:
It would be nice to have a delete button within the device’s screen popup. The same as it’s with the entity’s. When deleting a device, all the entities of that device would be deleted automatically.
Current workaround:
I empty my MQTT broker of messages which were sent from the device, then I use the configurator plugin to edit config/.storage/core.device_registry where I carefully remove the device. After a reboot of home assistant, the devices are gone.
In the pictures below, the 3d_printer is actually a sonoff basic running ESPhome with MQTT connection, not using the API.
This picture is when you click the settings icon next to the entity itself
afaik that deletes the integration, which deletes all my MQTT devices in that integration. The device 3d_printer is not the only one in there, but it is the only one I would like to remove.
This issue is a generic issue and not just related to MQTT
It is the same for example in Deconz.
If I delete a smart plug from Phoscon and Deconz then the device is not deleted from Home Assistant.
I can delete the entities but that is not the same!!! Not the same!!!
There will still be a device left behind which is visible in the .storage/core.device_registry
Many will probably just ignore this. But it is wrong to leave this cruft behind. I have personally removed at least 15-20 devices that I used and then replaced by something better or more stable. I would have all these ghost devices all over the place if I just ignored it. I am sure over time they cause stability problems and for sure you get name clash issues. So they have to be removed.
There are two ways to remove these ghost devices.
1 Delete the entire integration that added them. Good luck if you have many devices and have renamed many of them in Home Assistant. When you add devices in deconz not all of them can be renamed in Phoscon. There are sensors associated with the devices that cannot be renamed. It is a heck of a mess to remove the integration and add it again. And I am sure it is the same with other integrations.
2 Hack the .storage files. I advice to remove the entities using the user interface and only remove the devices. Make a backup first!!! Then stop home assistant. And then you edit the .storage/core.device_registry. Make sure not to goof the JSON. Pay attention to the commas. Especially if you delete the last device in the list. No comma allowed after the last device. Then restart Home Assistant again
Horrible! Just horrible.
What we need is simply a delete button when you look at the device in the integration, or when you look at the list of Devices. Just like it has been implemented for integrations.
I’m seeing something similar. I’ve got a ghost device named Unknown Node 12 that has empty device info (see pics below). I have no idea what this device is, nor is there a way to delete it in the entities screen (it doesn’t show up there). At the moment, it’s more annoying than critical, but it would be nice to be able to clean it up.
Hope this will get solved soon. Only thing missing prior to 1.0 release from my point of view.
I ran into problems when I tried to remove a deconz device and later add it again with the same name.
Had to remove it manually from .storage/core.device_registry
I somehow manage to get orphan devices, I mean, does it make sense to have a device with ‘No integration’?
I have lots, some of them of UPNP I guess, others ESPHome and some old iPhone too, not sure if Mobile App or older, I also have some duplicate devices.
I even have some decies with two same integragion, “ESPHome, ESPHome” listed in the integration column
Now that HA is more device-centric (automations e.g. which is good) this should be more self-curated
I’m running into the same problem as well, mainly with ghost ZWave devices. I removed the related entities but I cannot remove the devices themselves. There is no way for me to remove the entire integration (it has been too pain in the a** to get it working again after the upgrade to 0.107.X).
I cannot find .storage/device registry files anymore. Do you know where they are located now? I’m running 0.107.5?
The feature request about deleting device seems to have been implemented. However, I cannot see any feature anywhere in the UI Thoughts?
I’m 0.107.3 now. I deleted orphan entities yesterday following the post above
I tried to use the “File editor” add on at first but the files are not shown, I ended up using Visual Studio Code. I also had to change write permissions for some files using chmod o+w
Another example:
I deleted my life360 integration, since i’m only using the build in GPS tracking in the HA apps. It did delete the life360 devices in the ‘Devices’ list, but i’m stuck with 3 entities which are in ‘read-only’ mode, so I can’t delete them? HA tells me the entities don’t have a unique ID, so they can’t be managed from the GUI. But the entities are also nowhere to be found in my .yaml config…