Remove leftover-devices and -entities from integration that is uninstalled

For example, I have installed and uninstalled the “doods” addon from the addon-store.
Now I have devices and entities that cannot be removed by the GUI.

Can these be removed by hand?

3 Likes

Yes but not before you restart homeassistant after removing the integration.

Running homeassistant on HA-OS and restarted the homeassistant / system several times.

Still, the leftover devices and entities remain in the list.

And I can not figure out how to get rid of them.

It was an addon that I installed and removed.

No integration to be found anywhere (configuration.yaml, GUI).

See if you don’t have them defined in the old automation, script, scene. If so, delete and try again.

If you select them using the tick boxes on the left, the menu bar just above the list should change and give you options about enabling, disabling and removing the entities.

As noted, entities can only be removed if the integration that created them is no longer installed, and HA has been rebooted.

The problem might be that HA seems to see them as being from the supervisor as the integration, rather than the doods addon?

When trying to delete I get:

I think indeed that they are seen from the supervisor as the integration.

This is odd indeed. What happens when you “turn them off” before trying to delete?

They are already turned off.

I decided to edit the core.entity_registry and core.device_registry files in the .storage folder by hand.
I deleted the leftover devices and entities form these files and restarted Home Assistant direct after.
The devices/entities are gone and no other side effects are noticed so far.

9 Likes

Seeing this same issue. I added a switch to smartthings and I have that integrated with HA… when I add devices I can hit reload and it will pull in the device… but when I remove a device from ST… reload doesn’t clear the device. If I re-add the device, now HA shows 2 devices of the same name… but no way to delete. Will try the direct edit to core.entity/device registry

1 Like

This functionality is so confusing!
Why isn’t the config the ground truth? Let me add and remove freely. I shouldn’t care for some dangling entities everywhere with every single change I make to an id or name.

Considering nuking my core.config_entries and starting over.

3 Likes

This is a negative customer feature and should be fixed.

There must be a method to “truly” delete devices without doing a hac.

3 Likes

Hello, i just stumbled over this “feature” right now with a orphaned group created by the deconz integration, which was replaces by a native HA light group.

I removed the group from deconz but it was still available (but oprhaned) in the HA UI, even after a couple of restarts. I couldn’t find any option to remove the device from the web ui, and had to hack the core.* files to remove it properly.

Please add an option to remove any orphaned devices directly from the web ui.

8 Likes

This is so frustrating. Just let me delete the junk. How hard can it be? It has been like that forever so there has to be some thinking about why it is like that. I guess you don’t want things to get deleted by accident. Give me a couple of popups warning about not being able to get them back etc.