The recorder integration has quite a few variables with default values. I wonder how exactly these work.
First, is auto_purge the same as the vacuum command in Sqlite ?
Second: auto_purge would be executed every night and purge_keep_days after that. So with a default of 10, you would have a maximum of 10 days of history. But my history goes back to the beginning of the Home Assistant installation. So this default doesn’t seem to apply. How exactly is that ?
First question: I cannot answer as I do not use Sqlite
Regarding your second question:
Home Assistant has support for both short- and long-term statistics. More information can be found here
The right and darker part of the graph line is provided by the state history (like before), and the long-term statistics provide the left and lighter part of the graph line (and is thus downsampled hourly data). (source: Release Notes HA 2023.12)
Thanks for the quick reply.
I think you are right that the 10 days default is just fore the short-time history.
I should have read better. The History documentation is clear about this:
“By default, the recorder stores the sensor data for 10 days. Older data is purged automatically. The data for the last 10 days is taken from the recorder.
If you select a time frame that exceeds 10 days, the data is taken from the long term statistics table.”. And I had look better at the database itself. It has a table “statistics” and a table “statistics_short_term”