Hi everyone, I have something I think is a bug, but wanted to check on the forum before filing anything on GitHub. There are a some posts on this topic where people are trying to show a “Statistics-Graph” (see 1, but I am just trying to show a plain graph.
I have some utility meter sensors that have stopped displaying graphs in 2022.11.1 when you click on the entity within the UI. It will show the data when I click the “Show More” button, but this links me to the history page. See below:
If I plot this sensor as a standalone history graph in the UI, it does display the graph as I would expect:
I have tried testing a few different sensors, and this behaviour only appears to be affecting the utility meters specified in the configuration.yaml. In the example below: sensor.house_power_kwh
I believe this is to do with 2022.11 having replaced the standard chart in the more info panel with a statistics graph, which plots points at most every five minutes, from the statistics database and not from the usual short-term recorder.
So if long-term statistics does not get recorded for your entity, you will now see nothing, as is your case.
Thanks wigster! Regarding this, would this be perceived as a bug of the utility sensor or something expected for people to fix?
To me this feels like unexpected behaviour: I’d expect that native HA Integrations to generally display within the UI. I guess it could be handled by either changing the utility_meter code to capture this statistic or have some fallback method for the UI to display the sensor if no statistic is available.
Will probably raise an issue on GitHub
If others find this thread, here are the conversations I have found which are related:
Looking at your post again – there is some sort of problem/feature in HA in general that means that the statistics card does not plot sensors which has states which typically increase but sometimes reset – e.g. exactly the output of the utility_meter.
This is somehow related to the state_class attribute for sensors – if it is “measurement”, it can go up/down without problem. If it is total_increasing, it should never go down, so maybe the card does some assumption on the data and fails to plot it. There is also a “total” state class, which can go down on resets and this should be the class of your utility_meter really, but this doesn’t seem to help.
Personally, I am not quite sure what the statistic graph card really is trying to do by differentiating between the different type of data. Data are data…
I just came across this after running into a similar issue. I have three utility meters tracking HVAC on-time for fan, heat, and cool. The heat on-time utility meter was showing statistics but the other two were not after a recent update. My fix was going into the developer tools tab and the Statistics page. This showed that there were statistic errors on two of the meters caused by a switch from unitless to ‘h’ units some time back. It let me fix by changing all historical data to units of ‘h’ and I think the issue is solved.