No statistics found for entity

Hello All,

Today I’ve found strange issue. I have graphs for phone battery level for each home member and it looks like this:

As you can see it shows graph so there is historical data. However when I click on the first one:

Everything seems to be OK.

However when I click on second one - i got this:


Which says “no statistics found” which is an obvious bullshit cause I can see them on first picture.

Same goes to third one and even fourth one (which is not included on the first picture).

I mean… what the hell?

I am having the same problem, seen after restoring a backup.

Check the same problem here, it seems like it can’t find the entity in some cases, like sometimes the link is broken or got broken changing things but I’m not sure where it’s coming from yet. I suspect if I re-created the entity the problem would have been resolved, but I’ll try that tonight.

I think I found a clue:

First you go to DevTools
Then you take the statistics tab
Then you find your entity that is causing problems, if all is well the option ‘fix issue’ is on the far left if you click on it you will get a popup with 2 options, one of them is to fix the problem without losing data, click on there.
Then the problem will not be solved, so then you find your entity again and then click on it so that you get a popup again and then you only click on ‘Update’. If all goes well, the graph will now appear again.

I don’t know how this is possible either, but I haven’t had much time to look into it yet

Hi all, its a long time ago someone respond in here. I have the same after restoring an backup.


You may have a corrupt database. Check in /config on the file system using the Terminal add-on .

I only get one option. The entire dialog reads:

Unsupported state class
The state class of this entity, is not supported.

Statistics cannot be generated until this entity has a supported state class.
If this state class was provided by an integration, this is a bug. Please report an issue.
If you have set this state class yourself, please correct it. The different state classes and when to use which can be found in the developer documentation.
If the state class has permanently changed, you may want to delete the long term statistics of it from your database.
Do you want to permanently delete the long term statistics of sensor.bob_s_phone_battery_level from your database?

                                 CANCEL    DELETE

If you choose DELETE then the entity no longer exists as a Statistic that you can add to a graph. Even after more than 24h after “fixing” it and even after seeing that it has lots more new data when you go look at it’s entity.

You should check in developer tools what state class does this entity have. It should be measurement. If not, you may need to override it.

Can you be more explicit? In Developer Tools I have lots of tabs (YAML, STATES, SERVICES, etc.) so which tab? Then what do I do in that tab to check?

Sure - find your entity in ‘states’ tab in developer tools, right to it or in top panel after you click on its name you will find all its attributes. There should be one named ‘state_class’ - if it is missing or not ‘measurement’ then you may want/need to change that. This can be done either on the entity definition (when it is done in yaml) or may be altered by customize* in homeassistant: (Customizing entities - Home Assistant) if you did not use yaml to define the entity.