Thanks – will send the vote. Unfortunately, sometimes it makes sense to keep some data much longer than others in order to analyze performance of systems (I talk about controlling central heating, etc).
Sure.
Most people needing detailed analysis use InfluxDB + Grafana for this.
Most HA users are happy with long-term statistics (aggregated data that never expires), nowadays.
Most HA users are happy with long-term statistics (aggregated data that never expires), nowadays.
The long-term statistics is also a challenge, e.g. the apexcharts do not display this long term data. It would actually work for me if I could simply integrate it into the existing UI. Any ideas how to do it?
Unfortunately, if I add the ‘statistics’ section, there is nothing displayed and the current value of the series shows as N/A (code and screenshots before and after below)
Ok, @koying, you were right way up in one of the the first posts. The state class of the entity was set to “total” instead of “measurement”. If the device class is “volume” then the state class cannot be set to “measurement” (it must be “total” or “total increasing”).
Once I removed the device class value (I simply left it empty), I set the state class to “measurement” and now the statistics in apexcharts works…
Oh, well… Why the device class “volume” cannot be of state class “measurement” I have not idea. The unit is still in litres so it shows properly and it seems to work now.