Sensor: state_class_removed

I updated core, and now I have a bunch of warnings:
sensor: state_class_removed

The entity no longer has a state class

We have generated statistics for ‘Dishwasher Current’ (sensor.dishwasher_current) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

But this is a power plug, one of 4 we own - the others don’t have this warning.

Also stuff like this

The entity no longer has a state class

We have generated statistics for ‘Tablet Battery Level’ (sensor.tab_battery_level) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

The unit has changed

The unit of ‘Front Door Battery’ (sensor.front_door_battery) changed to ‘%’ which can’t be converted to the previously stored unit, ‘’.
If the historic statistic values have a wrong unit, you can update the units of the old values. The values will not be updated.
Otherwise you can choose to delete all historic statistic values, and start over.

How do you want to fix this issue?

Again, why only a couple out of many?

But here it is anyway:

image

Hi aussie1497,

2 links about the changes:
2024.10: Heading in the right direction - Home Assistant.
and
2024.10: Heading in the right direction - Home Assistant.

Why just these, because these are the one it found with problems. Some you may have to add a state_class to, others might have other problems.
Template - Home Assistant.
Sensor entity | Home Assistant Developer Docs.

Since I guess it means it was probably broken before but it just wasn’t flagged
I tried to press delete and close but the error is still there

See iif you can add a state_class, parameters are in the links above.

Did you try this from Developer → Tools → Statistics → FIX ISUUE

Others have reported that system reboot (not a HA restart) removes these issues. https://community.home-assistant.io/t/filter-platform-errors-after-update-to-2024-10/777953/7?u=tom_l

I have rebooted many times.

I’m not convinced the battery state doesn’t exist for example look at this

Developer → Tools → Statistics → FIX ISUUE

It seems like in that list there are many more issues than before and now I’m wondering if you can batch fix it because there are more than 100 items

There is a recent issue on GitHub about stuck repairs (although corr. statistics issues was fixed weeks ago, ie long before 2024.10)

state_class is missing, not state.

Check the right hand column in developer tools → states to see if the entity has a state_class attribute.

Those are all gone now.

But, is there any way to mass fix these issues?

I Haven’t tried it yet but yes you should be able to perform bulk operations with this:

brave_screenshot (1)

I was able to delete all the issues and then after a few more reboots finally the errors from the main page are gone

I seem to have the same issue as described above. I tried creating several group sensors using the UI which sum the energy measurements for several devices. It all seems to work fine then periodically I get the sane errors:

We have generated statistics for ‘AV & Networking Total Energy’ (sensor.av_networking) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

The multiple group sensors that I created last week will be working fine for multiple days, then periodically I will get this error message.

I’m not sure why it works correctly then will throw the error. That behavior seems like a bug. Is there any open bugs on this topic that y’all have found?