I took their recommendation and removed “purge_keep_days: xx” from my config. For the one thing that I’m interested in keeping data for an extended time, it defaulted to 10 days and deleted all of my old data.
Looking into it further, I had to edit that particular sensor and add “state_class: xx” (measurement, total, or total_increasing) as described here to get long term statistics working.
Time will tell, but hopefully I can start collecting more data. I’m bummed I lost my nice long term graph, but in the end maybe this will be better.
Edit: Now I’m on a tear going through all of my custom sensors and making sure they have a state_class associated with them. I’m learning that in some cases, I can configure them through the UI as a helper instead of in YAML.
It might be worth keeping purge_keep_days configured to less than the default 10 days to keep the database size small and speed up backups etc, especially in setups running on low power hosts like a Pi and with large amounts of sensors.
HA is configured to log everything into MariaDB (which does not get backed up) so my backups are only 84MB including most add-ons. I use the “Home Assistant Google Drive Backup” add-on and tell it what to back up and what to ignore.
I took their recommendation and removed “purge_keep_days: xx” from my config. For the one thing that I’m interested in keeping data for an extended time, it defaulted to 10 days and deleted all of my old data.
Looking into it further, I had to edit that particular sensor and add “state_class: xx” (measurement, total, or total_increasing) as described here to get long term statistics working.
Time will tell, but hopefully I can start collecting more data. I’m bummed I lost my nice long term graph, but in the end maybe this will be better.
Edit: Now I’m on a tear going through all of my custom sensors and making sure they have a state_class associated with them. I’m learning that in some cases, I can configure them through the UI as a helper instead of in YAML.
It might be worth keeping purge_keep_days configured to less than the default 10 days to keep the database size small and speed up backups etc, especially in setups running on low power hosts like a Pi and with large amounts of sensors.
HA is configured to log everything into MariaDB (which does not get backed up) so my backups are only 84MB including most add-ons. I use the “Home Assistant Google Drive Backup” add-on and tell it what to back up and what to ignore.