Energy dashboard, hostorical data, database size

Hi all,

so I have an issue I and I would like to know how others deal with it:

In the past, I had MariaDB running on my NAS and never purged as there is plenty of space. However I did not like that my HA depended on the NAS (i.e. when making updates etc). Next issue was that QNAP did not offer a version that is recommended for the most current HA versions.

So as I moved my HA from a Pi to a ThinkCentre which turned out as a great idea, I also moved MariaDB back onto the same box (using the HA addon). This is all fine an performant, but the backups tend to become REALLY large if I don’t purge historical data from time to time.

This wasn’t so much of an issue as I record sensor data to Influx to have the possibility to work with historical data. However since there is the energy dashboard, I don’t like this solution any more. I want the Energy Dashboard to have the historical data available, as this great feature doesn’t mak emuch sense if I can’t compare for example with last years usage…

So my questions:

How do you guys handle this?

Can’t there be an option to exclude energy dashboard relevant data from purging?

Why can’t we configure HA to read data from the InfluxDB which seems to be much more efficient when it comes to storage usage…?

The energy dashboard uses LTS (long term statistics).

LTS are not purged as they take up very little room in the database. I believe it is hourly stats, so 24x3 (mean, max, min) per day for each sensor.

Only states and events are purged.

Set the purge keep days to whatever you need. e.g. For most entities I don’t need state and event data beyond 7 days. For those that I do I use either LTS or InfluxDB and Grafana.

1 Like

Oh that is great, I never knew about that.

Thank you for making me aware!