Delete individual device (and entity) from integration

For rfxtrx this has been solved in 0.117. If you select options in the UI you can batch delete devices.

1 Like

Yes, I have found it after a few hours of frustration. This way of deleting the devices is counterintuitive as hell. Why on earth isn’t there a delete button next to the device in the list of devices inside the integration? I mean, common! What kind of UI/UX is this? Nobody take this the wrong way, but I think some objective criticism won’t hurt HA in quite a few places. It’s a great system overall, but things like this type of UI/UX design prevent it from being perfect.

1 Like

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.

It works for me:

  1. Delete entities of not accessible devices (like you delete zigbee devices in deconz, restart HA, then entities are not available and can be deleted)
  2. uininstall related add-on or/and integration (for me deconz), restart HA
  3. devices are gone

This is not a solution. This is maybe a workaround at best.

1 Like

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.

Can someone develop a button for this? it shouldn’t be hard, right?

1 Like

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?

This is true but there is no id or altered/given name visible so you don’t know what you are deleting and so it doesn’t work for me.

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 ?

1 Like

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).

Paid by paypal.

1 Like

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. :smiley:

Peace,
Billy

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.

1 Like

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

  1. 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)
  2. Select all entities that contain ‘old-’ and delete from the entity browser in HA… we are now halfway there…
  3. Stop Home Assistant (in my case stop the container)
  4. BACKUP YOUR DEVICE FILE!!!
    → mv /Volumes/DockerAppData/HomeAssistant/config/.storage/core.device_registry /Volumes/DockerAppData/HomeAssistant/config/.storage/core.device_registry.bak
  5. Upload your now backed up core.device file to the hierarchical online JSON editor
  6. Search for ‘old-’ in the text box. The disclosure triangle will reveal just the device you are looking for.
  7. 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.
  8. 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.

Enjoy!

2 Likes

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.

Thank you for the detailed suggestion!

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? :slight_smile:

2 Likes

Stumbled across this thread as I was browsing suggested changes to the code in HA. You might want to read this: https://github.com/home-assistant/core/pull/66209