QUESTION: How to delete an invalid entity with no unique ID (UNSOLVED)

I’m not sure this was a good idea, but I was able to solve this by creating a new group (available in the gui through helpers in 2022.4) with the same domain type (i.e., light in my case) and entity name, then deleting it. It removed it from entities altogether and it is no longer visible in the GUI. Curiously when I grep my /config directory for that entity name I still see references to it in the db, but it no longer shows up in the GUI. Use that FWIW.

4 Likes

Interestingly I fixed mine by clicking Reload ‘Template Entities’. Even though I had restart HA many times and it did not fix it, clicking that instantly got rid of all the rest sensors that didnt exist.

6 Likes

Wow what a ballache! Thanks for that @tylerb, solved it!

I wish I could do the same with two dead Ping sensors. But “Reloat template entities” is not there as a service or in the GUI. Any idea where it went?

Developer Tools → Template Entities

Thanks, but that’s not here, I have YAML, States, Services, Template, Events and Statistics.

Yeah the layout has changed since I posted that, its now under YAML.

I may have found it, it’s just totally different named from English, that’s probably why I didn’t find it before. There’s something caled “manually configured MQTT devices”, between persons and scenes. Is that it?

Thats not the same definition as what Template sensors are, I’d just suggest you try each one, one by one. They wont hurt anything from what I’ve noticed.

I’ve had the same problem with a switch for an entity that I’d created in YAML. YAML code deleted. Switch still in the UI. Could not delete in the UI. Restarts did not help. Reloaded template entities and BAM its gone. Thanks!

2 Likes

This worked for me when a bunch of read-only “unavailable” ghost entities where left over after I renamed a device, there was no ‘delete’ button for them and they wouldn’t go away after a restart. After Reloading “Template Entities” and refreshing the GUI, they were gone.

3 Likes

Yeah wish it was easier, these read-only entities which seem to stem from configuration.yaml entries are a pain in the bum. Let me delete them with a note it’s at my own risk if I do.

I had the same problem, what probably fixed it is that I opened home-assistant_v2.db with the SQLite extension in VSCode and did a cleanup in the states table. After restarting HA several times, and logging out and in again, the entities were finally gone. Hope it helps someone.

Leaving my solution to the problem here (hope it helps if all of the above solutions fail).
Had the same issues: read-only entities from YAML entry that weren’t deletable (no restart, no reload of the template config helped) even after removing them from the YAML file.

So I tried clearing the browser cache, and now they are gone from the entities overview and the dashboard (had them under sensors). Using Chrome, what helps is doing: CTRL + SHIFT + i, once the developer tools open right mouse click on the “reload this page” icon next to go back and go forward buttons.

12 Likes

Brilliant! Who would have thought it was a BROWSER CACHE issue :slight_smile:

Thank you!

4 Likes

Clearing the browser cache also fixed it for me.

Thanks a bunch

1 Like

Wow! I’d have thought that it would be easier to find the fact that those zombie entities are (or at least can be) present solely locally in the browser.

I’ll throw my $0.02 in here as well. Had this problem with a Z-wave switch that died and I changed the name so I could add a new switch. Even after deleting the old Z-wave device, the zombie switch entity was still there. Based on the post above, I checked my groups and, sure enough, that switch had been part of an old group that I no longer use. Deleted the switch from the group, rebooted, and the Zombie was gone.

Not sure EXACTLY what is going on, but it appears that there is an oversight in whatever checks the code does of groups before allowing you to rename an entity.

Yep had this same issue with zombie entities while trying to rename and swap out some switches… Clearing Browser cache also resolved it for me – ugggggg that was an annoying loss of time!

1 Like

Thanks! I was searching for a way to remove duplicate entities (“_2”) and nothing helped (entity registry, database, removing it via rest call, …) until I found your solution. Thanks a lot!