home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.98k stars 30.17k forks source link

The unit of sensor (None) cannot be converted to the unit of previously compiled statistics (Unit) - no fix offered in developer statistics #126724

Open Bastian007 opened 1 week ago

Bastian007 commented 1 week ago

The problem

I can find a warning for sensor but the statistic page does not offer a fix as mentioned in the message below: The unit of sensor.pv_power_kwh (None) cannot be converted to the unit of previously compiled statistics (kWh). Generation of long term statistics will be suppressed unless the unit changes back to kWh or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this

What version of Home Assistant Core has the issue?

2024.9.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

n/a

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

mib1185 commented 1 week ago

Which integration provides the sensor.pv_power_kwh entity?

Bastian007 commented 1 week ago

Selfcreated helper: Integral sensor (Left Riemann sum). Input sensor for that is coming from another helper (Combine the state of several sensors) to calculate the sum (statistic characteristic SUM) of two solar power sensors of Solarman integration.

mib1185 commented 1 week ago

Somewhere in between this chain of helper helpers the unit of measurement (uom) get lost. You should check the helper configuration and ensure a proper uom is set.