I have my Energy Dashboard configured properly (as far as I can tell), however the sensor statistics are only available for a bit over a week or so. Looks like I cannot get a proper history view of my consumption, even though the sensors providing the inputs have been running for months (some almost a year at this point).
Is this something I will need to change at the sensor level, or is there a setting in the Energy Dashboard that would allow me to look back? Where should I look?
This is my current configuration:
electricity input is provided by a P1 Power meter (via Homewizard integration)
Solar is provided by the SolarEdge integration
Gas consumption is provided by a Zigbee door sensor I configured a few months back
device readings are coming from various Shelly devices and a Panasonic Comfort Cloud integration for the A/C
No, it’s been set up for a while. I think it comes down to storing the history of the sensors for a limited time - if I check the individual entities, I see the same there (ie. history is only available from last week of November)
I have not touched it up until yesterday when I started looking into DB management on this forum, so up until then I had the default set up that comes “out of the box” after installing Home Assistant OS.
I have this same issue, but for my solar edge intergration. I had to remove it and readd it and I lost all the data. I wanted some backfill with it because it is all available.
Did you make sure that the sensors are named exactly the same after you re-added the integration? I was browsing the forum to find an answer to my problem, this came up in various other topics.
As far as my initial problem is concerned, I have tried to read up on this, but unfortunately the situation does not make sense. Entities added to the Energy dashboard should be treated as part of LTS. State_class is configured properly for all. (total_increasing)
It is as if something drastic occurred around the 25th of November and the system cannot access any data before that. Where can I see/validate what happened?
Just to conclude the topic, let me share the closure: after doing tons of reading and doing some very beginner-level poking in SQLite, it turned out that all the statistics were gone from the DB. Dong some additional read-up on this topic, I realized that the DB got corrupted and HA automatically created a fresh one during the bootup coming after the incident.
I did not get any flashing warning concerning the issue, but digging around in the logs showed me that this is what happened.
The solution? Frankly, I did not bother to restore the DB (there are apparently ways to do that if you are really determined and attached to your old DB, but I ended up migrating to MariaDB.