Remove entries from database


I have tried to find an answer to this, but so far none have helped, most ends up finding entries in the .storage directory. I have several entities that are no longer present that can not be deleted since " This entity does not have a unique ID, therefore its settings cannot be managed from the UI.", it is not present in the configuration files and not anywhere under .storage, only in the database (home-assistant_v2.db). Is there any way of cleaning out these entries from the database? I guess its from older devices from my previous zwave integration before I moved to zwavejs2mqtt.


The database only keeps data for 10 days by default, or whatever you set your recorder purge keep days to if you changed it.

You can run a database purge now in Developer Tools → Services. Be sure to set “Repack” to true.

If it is long term statistics you can remove them by clicking on the “FIX ISSUE” button in Developer Tools → Statistics.

Thanks, I tried that now, Recorder: purge entries and selected two of the removed entities, but they do not get removed, not even after a restart and they are not present in Tools → statistics.

And come to think of it, I do not know how the entities are populated, I would have guess on the .storage files, but since I only get a match on the DB file maybe that can also be the source, not only for lookup history.

Now I purged all and set it to 0 days, plus purging the entries and then a restart of the container and in fact they seems gone now!