I have this issue from day 1, but was only when I started using the energy dashboard that the problem became visible. Basically, my energy dashboard shows completely absurd data, and it turns out it is all related to the way data is written to the “statistics” table in the Home Assistant database. Instead of having a new entry every hour, or with a certain periodicity, data is written to the statistics table at completely random times (I have days with no writings, days when it was written only once and the most typical case which is five or six table entries at random, like at 5:00, 6:00, 13:00, 16:00 and 17:00).
All other tables in the database seem fine, short-term statistics table is normal.
Is there a way to manually set the write interval on the “statistics” table? What exactly is the mechanism behind the “statistics” table? Is it a periodic summary of the data contained in the short-term statistics table?
My view/experience is the other way round…short_term is ‘random’ (seems 5 mins) and statistics is hourly
From what I have seen short_term populates into statistics at the hour…but I only know my / one instance
But that is what it does for as far as I am seeing… my statistics sensors seem to have an hourly update (I did not check all of course). It feeds into statistics and ‘sometimes’ it resets (don’t know why/when)