I have been playing and trying things with Home Assistant for a few weeks now and in the process renamed sensors, moved them and changed them to figure things out. Now I am stuck with many sensors that are no longer configured in configuration.yaml or have different names. How can I permanently and fully remove unwanted or unused sensors ? Same way I have sensors that I am still using but had to figure out locatio, mounting etc so there are a lot of useless readings that are of no value, how can I remove historical data from a sensor ?
I have used google to look for this but have not found any straight fwd answer, I found a great variety of āanswersā that talk about very different ways none of which I understand or I donāt have the files in question on my HA system etcā¦
Kind Regards
Jan P.
PS: Here my versions:
OS Version: Home Assistant OS 9.3
Home Assistant Core: 2022.11.1
I am surprised there is no response. I can surely not be the only one that wants to remove devices that no longer exist from HA or delete historical data. Can nobody help in this matter ?
unfortunately that does not work cause the switches that I like to remove are snmp switches that dont allow for a unique_id to be set. The GUI does not seem to be the place for me in this instances. How can I remove entities that can not be managed from the GUI ?
I am a bit puzzled now TBH. I was trying to find the entities in the states like āDeveloper Tools > Statesā where I had seen them before but they are gone now. In fairness because of what I experienced I have started working on a HA VM installation on my server instead of the R-Pi cause that gives me the much easier backup option on the VM image. Is there a delay between me changing the config.yaml and what the GUI shows ? The issues I had with non existing states on the R-Pi appears to have vanished. On the VM installation I manually give everything that accespts it a unique_id now to avoid issues.
So in short, I have no states showing that are no longer configured now. If I know it just takes time to disappears I can deal with that and move on.
Why I just found out is in the tab STATISTICS those sensors will show up as having no state (or something) with a button FIX ISSUE. Clicking that will give a popup with the option to remove the sensor statistics and long statistics.
This fixed it for me! (had a lot to delete myself)
This did not work for me. Although I can select the specific Entities under Service/Recorder: Purge Entities and execute āCall Serviceā, they are still showing up, even after rebooting.
hi ,my broadlink door sensor is the same situation. i have renamed and I am going to delete the old sensor name and then let it can be found the new sensor name.
finally did you delete the sensor without unique_id ?
Currently Iām in the same situation. Iāve created a template sensor for the outside temperature and afterwards, I changed the name, because it was not really matching.
When I now type āoutsideā I do see the old and the new sensor.
I was able to delete the second Entity, but the sensor remains and it only tells me that it would not have an unique_id. This is clear, because itās been created in the configuration.jaml, but how to I get rid of the wrong one now?
I was having problems removing sensors that were auto created. Looked everywhere and couldnāt find where to delete them and found no good answers online to this question. Finally I noticed that the sensors werenāt showing up in my iOS app, just the web browser I was using. So I deleted my browser cache, and now the sensors donāt show up anymore. Hope this helps someone.
I guess I did not pay attention and after a while, they were gone. So I cannot say what might have happend. I did a lot of research and tried out several āideasā. Then I gave up and now they are gone. It might be the cache like @Cooley is saying or some other solution I tried.