Skip to content

Home Assistant state class and unit of measure #3331

@ykri

Description

@ykri

Issue

Since last HA update 2024.10 I am getting two repair issues for raw value.


The entity no longer has a state class

We have generated statistics for 'ElectrMeter Raw Value' (sensor.electrmeter_raw) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

Statistics cannot be generated until this entity has a supported state class.
If the state class was previously provided by an integration, this might be a bug. Please report an issue.
If you previously set the state class yourself, please correct it. [The different state classes and when to use which can be found in the developer documentation.](https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics)
If the state class has permanently been removed, 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.electrmeter_raw from your database?

and


The unit has changed

The unit of 'ElectrMeter Raw Value' (sensor.electrmeter_raw) changed to '' which can't be converted to the previously stored unit, 'kWh'.
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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions