I’ve now been using home assistant for several years and most of the early challenges and learning-curves have been over-come. However, there has been a long-standing issue that is a constant frustration — removing old devices doesn’t have a standard approach and in some case is impossible from the GUI. There is a way though.
Devices (and entities) can be deleted (or modified) the manual way directly from home assistant system files. Some of the files which you might need are called core.device_registry and core.config_entries core.entity_registry. These are located in \config\.storage\ whcih (as a windows user) I access via the “Samba Share” supervisor add-on. If you don’t have supervisor you may need to access these files a different way.
I used this to remove a dead Drayton Wiser TRV from HA — by deleting the whole relevant section from core.device_registry…
"manufacturer": "Drayton Wiser",
"name": "Wiser iTRV-Dead",
"name_by_user": "Dead TRV",
And also 2 sections (for the 2 associated entities) from core.entity_registry (I haven’t shown these as they should be obvious — the format is the same as above with the sections enclosed by curly-braces)
I have also used changes to core.config_entries to change the IP address of an onvif IP camera which home assistant was refusing to connect to after the IP changed. The same is no doubt possible for other devices.
What do you think? Drop us a comment below! If you would like to subscribe please use the subscribe link on the menu at the top right. You can also share this with your friends by using the social links below. Cheers.
Thanks ! it works for me !
On debian, use /usr/share/hassio/homeassistant/.storage
I have succesfully delete 7 old devices kept in agentdvr intégration