Question about history graphs in home assistant- purge time in recorder yaml

Hello all,

Could someone help me with the information I am seeking below.

How long does the information in the history graph stay? Is it indefinite? As in, if I go to look at the graphs 6 months from now, will I have 6 months worth of data?

Does the purge keep days affect this graph in any way-- I currently have it set at “purge_keep_days: 5”? I would like to be able to keep the data related to the 3 temperature sensors for around a year as I am trying to determine if I can hook an area in my basement up to the 1st floor hvac at my home. (i.e. if the temps are reasonably similar throughout the year at ambient- I would be ok with this route even if it’s not the most optimal solution at my home)-- However I would like this decision to be data driven. Worst case, I find out it’s a horrible idea based on the data recorded.

Within a purge interval.
So-called “short-term statistics” (calculated every 5-minutes) is also kept within this period.
So-called “long-term statistics” (LTS) (calculated hourly) is kept forever.

To be stored in DB, an entity should not be excluded from Recorder.
Statistics is calculated for numerical “sensor” entities with “state_class” defined (“measurement”, “total”, “total_increasing”).

Check if these sensors have LTS.
If they not - check if they have “state_class” defined.
So you may still have purge interval =5 , but for these particular 3 sensors you will be able to see hourly statistics for the whole period (while you DB file is not deleted).

Not sure you will have a way to automatically analyse gathered stats (unless you manually take them from DB & process in some software).
Anyway, you will have graphs with stats for analysis.

Thank you so much for your knowledge/ assistance. I will look into these things later today and report back what is found.

EDIT: I had a chance to look at everything deeper and it seems everything is working as expected. I will look at things in a few weeks just to be sure all of the data is still there.

And yes, to analyze, I will have to find a way to pull the data out of the database when the time comes or maybe the visual of the graphs will be enough and I won’t have to analyze outside of home assistant.

Thank you again @Ildar_Gabdullin. You have helped me many time and I am very appreciative for it!!