To keep the database under control I exclude a lot of entities from filling up the database with the recorder setting in config.
Have often been thinking, why isn`t it possible to also be able to do that in the gui (integration/device or entity (class) properties for example). A “keep record yes/no” toggle in these property settings would be very helpfull in my eyes.
Just never really been in the picture to do so, or any (practical) reasons why it is not (easily) possible to do?
I agree as well, moving it to the GUI like all the rest of the configuration is going - but may I suggest that if someone was to implement this, they include an option to delete all history for the object you no longer want to retain the history for.
A simple “I see [object] currently has [x number] historical records, do you wish to keep them?” type question with a yes or no response would be the simplest, and I wouldn’t mind even an “Are you sure?” double confirmation just to make certain you absolutely want to do it.
Right now it’s a painful process of making changes to the database which includes the inherent risks of making a change at that level.
A simple “I see [object] currently has [x number] historical records, do you wish to keep them?” type question with a yes or no response would be the simplest, and I wouldn’t mind even an “Are you sure?” double confirmation just to make certain you absolutely want to do it.
You mean clearing historical data from the GUI. This already can be done easily through developer tools-statistics can’t it? If an entity is deleted or set to inactive it shows up there and you could choose select everything with problem (or manually select the ones you’d like to remove) → remove selected statistics.
Although doing it all at once within the proposed feature would make it more easy in excluding the need for that step.
In my case it didn’t. I see “This entity is excluded from being recorded.” for a few entries, but most have “No issue”.
I didn’t know about all the statistics that were being collected when I first built my HA environment, until my database grew to 2.5 GB in size (and using Google cloud as a backup destination it quickly imploded, but even now with Nabu Casa as the destination, I’m limited in the number of backups I can store). So in researching it found the discussion of disabling recording historical data for certain objects which I did in configuration.yaml.
But that historical data may no longer be collected, it’s still in the database, and while not growing larger, it’s certainly not shrinking. I’ve read the threads on how to edit the database to manually delete that data, I just haven’t taken the time or risk to make the deletions in the database myself since almost everything is working and stable for the moment.