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
Comments
Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) zha documentation |
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. |
Not stale |
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. |
Not stale |
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. |
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 towater 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:
core/homeassistant/components/zha/sensor.py
Line 415 in 3bb435c
and this one:
core/homeassistant/components/zha/sensor.py
Line 463 in 3bb435c
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?
Additional information
No response
The text was updated successfully, but these errors were encountered: