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?