Because I don’t need those sensors anymore I’ve removed the sensors from the yaml file.
After a restart of HA the template sensors are still there and I cannot delete them from the GUI. Probably because they don’t have a unique id.
Also those sensors can’t be found in the files in the .storage directory.
How to delete those sensors?
I’m using the latest version of HA 2022.6.6
They are not in the yaml anymore. That’s the strange thing. If I search in all files in the /config I don’t find those sensors not in the yaml and also not in the .storage folder
It seems something has changed. Normally in the past those sensors where indeed removed if you remove them from the yaml files.
I tried to purge only one template sensor with the service “Recorder: Purge Entities" and now all 10 template sensors are gone. Very strange. There is definitely wrong behaviour!
But anyway my problem is being solved!
I am also having this issue. I had several sensor templates I want to remove and turn into template sensors. I have cleared them from my sensor.yaml file, restarted HA but they are still there. I have used recorder.purge_entities but they don’t seem to be going away.
Actually, it looks like they have now gone. I used the Developer Tools → Services. Then called the recorder.purge_entities and selected the entity sensors to remove. After 5 minutes I restarted HA and they were gone. Not sure if this is the correct process or not, but it seems to have worked…
I also have this problem. I removed two template sensors from the template.yaml & noticed the entities still existed. So, tried to delete them but, as no unique id, can’t.
Then I ran the purge entities service, checked that all history had been deleted & restarted HA (multiple times). I had also checked that there were no related items & that no other references to the sensors remained in the template.yaml
However, the entities still persist. Fyi, both still have state values (‘enabled’ ; they were template sensors that converted the ‘on/off’ state of a switch to text ‘enabled/disabled’) but, of course, they are not updating.
Anyone have other suggestions ? I guess it’s not a big issue (just 2 entities) but it’s annoying.
I understand where you’re coming from - but I’ve searched thoroughly through the UI. I’ve also searched through core.config_entities & core.entity_registry (in .storage) - nothing.
Looking further just now, found both in .storage/homeassistant.exposed_entities. So, went back to the UI and again looked through the Voice Assistant exposed entities and they are not there.
Is there somewhere else to look? I assume directly editing the ha.exposed_entities file isn’t a good idea (& would that fix it anyway?).
Sorry, perhaps I wasn’t sufficiently explicit - 1st thing I did after noticing they were still listed in developer tools states was to search all yamls (config, automation, templates, etc etc - all of them, with a txt editor & through VS code) - nothing. Also, as previously noted, HA reports the entity as having no related items.
Right, but are you manually doing that? I.e. going to each file and just using the find function? Or are you using a find in files function that points at your config folder?
If the entity does not exist in any file in your config folder, it’s in your database. Lastly, it could also just show up in your browser cache.
lastly, keep in mind that VSCode addon ignores the .storage folder. So you’ll have to manually open the storage folder via “open folder”, then do your find in files there.