I agree, It’s a total oversight that we cannot delete devices in the same way as we can delete entites. Simply from the overview, ticking a box and pressing delete.
I also am still unable to delete read only entities. The whole WTF or what was its name week raised this and supposedly a solution was delivered. But I don’t see any option to delete this clutter.
It would be great if we can delete these devices as easily as entities. I have several z-wave switches via the SmartThings integration that I had to remove and am stuck with the ghost devices after deleting the entities.
So glad I found this thread. The deconz.remove_orphaned_entries finally clean up the mess I had created when I decided to abandon my sengled bulbs for a whole load of $3 RGB wifi bulbs I found at the local return depot and converted to Tasmota.
I do totally agree though that a simple “Remove Selected” or a red x in the device section would be great.
My Google nest mini looses connection from time to time, sometimes daily. My home mini keeps working.
So i regularly have to setup thee nest mini again.
I can delete the entities of the ‘old’ nest mini, but not the device. This is very annoying. Please add device deletion !
One more for delete option. I connected HA directly the my Lutron Caseta hub so I didn’t need the devices in SmartThings along with some virtual switches used by Homekit. I got rid of them by deleting the integration and re-adding it. I then had to enter the areas for 21 devices that still remained. I plan to move the rest of the devices off of SmartThings one by one. I really don’t want to have to delete the integration every time.
I think I’m running into this issue with MQTT auto discovery devices. I was troubleshooting trying to get things to work, and now it seems I can’t add devices if they have a unique name that matches something I was using during the troubleshooting. I assume the device, despite being deleted, is still in a config file somewhere?
Example: I have a device called Kitchen_Blinds I deleted. When I try to add it again, it won’t work, but when I change the name in the MQTT config to Kitchen_blinds3 it adds fine. If you delete that, you can’t read it again unless you change the unique identifier. Is this the same issue?
Is there any update to this ? have quite a few orphaned devices in various integrations I’d like to remove, but no clean way of doing so without messing with the config files themselves.
seems like a must have feature for the devices overview page ?
10 Euro for the person who programs the bulk delete function into the current HA GUI for Devices which then also removes the corresponding entity, I am tired of restoring device registry files from backup because I deleted a wrong comma (and the other hurdles to manually remove it).
I found my way to this thread while trying to delete a ‘ghost’ Device (I’d already deleted the associated entities). In this case, the device in question is one of three ZWave LED bulbs in a dining room light fixture - and I’m facing serious WAF repercussions following my migration from an old SmartThings v1 hub to Home Assistant. Everything went smoothly, with the exception of this one, oft-used fixture and it’s associated devices.
Ulimately, my requirement is to control the 3 bulbs as a single ‘device’ (or Group, or whatever the right ‘object’ is) – but it seems a pre-requisite for that would be getting all three bulbs added, and with their associated entities. For reasons this N00b doesn’t understand - the first two joined the network seamlessly (when performed one at a time), with two associated entities which allowed control from HA. For whatever reason, the 3rd device paired without a Level entity - and as a result, could not be turned on or off.
I sure don’t want to go digging into registry files, as others have expressed above. However, if that’s the only method to accomplish, today - I’m willing to give it a try. Unfortunately, I can’t even find a /config-storage folder on my device. *Disclaimer: I’m using a containerized deployment on top of the Balena platform – but I’ve checked in each of the deployed containers (homeassistant, hass-configurator, and MQTT) - as well as the ‘host OS’ (which is where I would think I would find it, since it needs to be persistent).
Long winded way of saying - a UI button or link to delete a device SURE would be handy. I’ll match @NODeeJay 's 10 Euro offer – now we’re talking 20 Euro.
This is an old topic, but I think it is still actual, and it’s not related only to MQTT but to all integrations in HomeAssitant. Sometimes, after an issue or maintenance, we can have an orphaned device object that we can never remove easily
For example, I’m facing the same issue with browser_mod integration that creates new devices each time the entire browser cache is cleared.
The result: increasing the number of orphaned devices and no possibility to clear them properly without removing and re-adding the integration (… and several restarts).
In my point of view, it will be safer to include a button or a service call that can delete a device (with all proper checks and cascade delete of related objects).
Letting users finding workaround like going in “config/.storage/core.device_registry” is dangerous, as the DB model entity might have dependencies on the devices that a user might not be aware, and raise later on issues.
I know isn’t EXACTLY the solution we all wanted but it IS a very easy way to delete the orphan devices you may have…
The issue: Unfortunately LiFx’s integration has no orphan reconciliation/cleanup. So even after reseting the bulbs, and purging them from Lifx cloud they still clutter HA. As has been mentioned numerous times you can purge the entries just not the devices via HA’s ui.
Here’s what I did
Rename all devices prefixing those I wanted to delete with ‘old-’, via Home Assistant ui. When renaming I also allowing HA to automatically renaming each related entity (generating a new entity name the ‘old-’ naming convention of the device)
Select all entities that contain ‘old-’ and delete from the entity browser in HA… we are now halfway there…
Stop Home Assistant (in my case stop the container)
BACKUP YOUR DEVICE FILE!!!
→ mv /Volumes/DockerAppData/HomeAssistant/config/.storage/core.device_registry /Volumes/DockerAppData/HomeAssistant/config/.storage/core.device_registry.bak
Upload your now backed up core.device file to the hierarchical online JSON editor
Search for ‘old-’ in the text box. The disclosure triangle will reveal just the device you are looking for.
Go to the root for that particular device (it will be the JSON number) and click on the action menu symbol (the second column) and choose delete… Then wash, rinse, and repeat… until you have deleted all ‘old-’ devices.
Save the edited file back to your storage directory, restart HA and happily observe your integrations now show all the bogus devices have been purged.
Thank you so much for describing this - I already did something like this manually in the past few days, but wouldn’t be surprised if I come back to your suggestion soon and try it out.
But it is still strange for me that it is necessary with such an extensive workaround - especially with a thing that should be included as standard. The issue has been discussed in several topics for more than 3 years. How do we make it a priority for the developers?
A partial solution was added in Feb 2022 release that is intended to address the issue of orphan. bulbs. Unfortunately for me it didn’t work, perhaps/hopefully it will work for some of you. Link to post: Cannot Remove Old LIFX Bulbs from Home Assistant - #6 by taw123
Update… Good news. I restarted my HA instance and the cached entity names seem to have been purged so I was finally able to delete the old/bogus named entities. This in turn created orphan devices which the new code I referenced above automatically removed (as designed)… Should have thought to try restarting before taking the time to post… Hopefully this now means no one else has to hand edit their database (unless you are into that kinda thing)… lol
The new discovery improvements in 2022.05 should make this a lot more straightforward too. The LIFX integration should now be much better at reconnecting to bulbs and marking bulbs offline as actually offline which should flag them as able to be deleted.