Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity reporting Power lost unit of measurement after update to 2024.12.5 #133989

Open
kyberias opened this issue Dec 25, 2024 · 3 comments
Open

Comments

@kyberias
Copy link

The problem

I have an entity that has been configure thru MQTT auto-discovery and has been reporting momentary kW consumption.

I never had to set the unit of measurement manually since it was provided via auto-discovery like so (one of the components of a device):

"Aidon7534ActivePowerPlus": { "platform": "sensor", "state_topic": "power/Aidon7534/Electricity/ActivePowerPlusInstantaneousValue", "device_class": "power", "value_template": "{{ value }}", "unit_of_measurement": "kW", "name": "Active Power", "unique_id": "Aidon7534ABC123ActivePowerPlusInstantaneousValue" }

Now after an update to 2024.12.5 the entity seemed to have lost the unit of measurement or reset it to incorrectly as W. This resulted the graphs to go haywire and I had to set it manually to kW. But now the graphs show these incorrect values.

image

Other entities that had device class "energy" and unit of measurement "kWh" seemed to have retained their settings, but this "power" device class entity did not.

Why would it reset to W and not respect the kW set via auto-discovery? This seems either a configuration error or a bug in HA. Please advice.

What version of Home Assistant Core has the issue?

2024.12.5

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?

No response

Additional information

No response

@kyberias
Copy link
Author

Ok it seems that the sensor was missing state_class = measurement. I have no idea whether this was the cause, but it probably shouldn't be the cause.

@home-assistant
Copy link

Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mqtt can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mqtt Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mqtt documentation
mqtt source
(message by IssueLinks)

@jbouwh
Copy link
Contributor

jbouwh commented Dec 25, 2024

@joostlek this might be something we want to have fixed in recorder statistics. It is not something we can fix in MQTT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants