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

ZHA water metering devices and device class issue #85554

Closed
mbo18 opened this issue Jan 9, 2023 · 6 comments · Fixed by #107685
Closed

ZHA water metering devices and device class issue #85554

mbo18 opened this issue Jan 9, 2023 · 6 comments · Fixed by #107685

Comments

@mbo18
Copy link
Contributor

mbo18 commented Jan 9, 2023

The problem

I have a Zigbee valve that gives the water consumption in litres. This device is using this quirk: https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_valve.py which set the unit of measurement to L and the device type to water metering

Due to the current handling of this kind of entity and the last update to HA, I now have this log:
Entity sensor.jardin_irrigation_controller_summation_delivered (<class 'homeassistant.components.zha.sensor.SmartEnergySummation'>) is using native unit of measurement 'L' which is not a valid unit for the device class ('energy') it is using

It seems that this code:

class SmartEnergyMetering(Sensor):

and this one:
class SmartEnergySummation(SmartEnergyMetering, id_suffix="summation_delivered"):

needs to be rewritten in order to set the device class based on the unit used by the device

What version of Home Assistant Core has the issue?

Home Assistant 2023.1.2

What was the last working version of Home Assistant Core?

Home Assistant 2022.12

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:980
Integration: Sensor (documentation, issues)
First occurred: 19:45:38 (1 occurrences)
Last logged: 19:45:38

Entity sensor.jardin_irrigation_controller_summation_delivered (<class 'homeassistant.components.zha.sensor.SmartEnergySummation'>) is using native unit of measurement 'L' which is not a valid unit for the device class ('energy') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jan 9, 2023

Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@mbo18
Copy link
Contributor Author

mbo18 commented Apr 9, 2023

Not stale

@github-actions github-actions bot removed the stale label Apr 9, 2023
@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@mbo18
Copy link
Contributor Author

mbo18 commented Jul 8, 2023

Not stale

@github-actions github-actions bot removed the stale label Jul 8, 2023
@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants