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
69.72k stars 28.87k forks source link

Utility helper records data value with incorrect UoM on restart #120472

Open crawfoco opened 1 week ago

crawfoco commented 1 week ago

The problem

Whenever HA is restarted (say, power outage, upgrade completed, etc), my Utility helper records a value that was not converted to the UoM specified in the helper.

Screenshot 2024-06-25 152158

My setup: Base sensor: Envoy lifetime production Wh sensor Helper sensor: Utility Meter, UoM set to kWh, reset daily

Generally, the helper works great. Even after the restart and the "bad" value is recorded, it goes back to recording values with the correct UoM. In this generalized view, you can't even see the "blip": image

But when charting "max" values, it becomes every obvious: image

Currently I do not know of a way to clear out these Wh values from the set of kWH values collected in the helper. They do not show up in the statistics adjustment tool.

What version of Home Assistant Core has the issue?

2024.6.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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing in logs

Additional information

No response

crawfoco commented 4 days ago

From the 'states' table. Notice the decimal (raw Wh instead of kWh) is missing from a couple of entries after being unavailable during a restart. image