"No statistics found" for utility meter in info popup panel

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:

image

If I plot this sensor as a standalone history graph in the UI, it does display the graph as I would expect:

image

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

utility_meter:
  house_daily_consumption:
    name: House Daily Consumption
    source: sensor.house_power_kwh
    cycle: daily
    unique_id: house_daily_consumption

Here’s all the values that show up for the sensor. It’s unclear to me if there are any changes I need to make:

image

Any thoughts are welcome :slight_smile:

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.

1 Like

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:

1 Like

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.

7 Likes

Same for me: Pressing Fix …fixed it :smiley:

Thanks, this fixed it for me too! They should place that “fix it” link near the chart if it fails to load.

@dr-harper Please mark @wigster 's remark as solution. Makes it easier for other people with the same issue (like me :wink:)