hass defined a constant for power unit, POWER_WATT = "W" which is used for unit_of_measurement.
unit_of_measurment is used in for example prometheus to report and group sensors into correct metric.
The new zwave_mqtt doesnt convert or align upstream "Watt" into what hass defines as "W".
https://raw.githubusercontent.com/OpenZWave/open-zwave/master/config/SensorMultiLevelCCTypes.xml
configuration.yaml
Hey there @cgarwood, @marcelveldt, @MartinHjelmare, mind taking a look at this issue as its been labeled with a integration (zwave_mqtt) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
This is actually an issue with the Power CommandClass reported by OZW.
It's string value is "Watt" while it should be "W".
We'll try to get this fixed upstream (in OZW).
{
"Label": "Power",
"Value": 0.6000000238418579,
"Units": "Watt",
"Min": 0,
"Max": 0,
"Type": "Decimal",
"Instance": 1,
"CommandClass": "COMMAND_CLASS_SENSOR_MULTILEVEL",
"Index": 4,
"Node": 2,
"Genre": "User",
"Help": "Power Sensor Value",
"ValueIDKey": 1125899945394194,
"ReadOnly": false,
"WriteOnly": false,
"ValueSet": false,
"ValuePolled": false,
"ChangeVerified": false,
"Event": "valueChanged",
"TimeStamp": 1589404028
}
@Fishwaldo can you have a quick look at this one please ?
The Notification CC uses W as string value for the Units while the (legacy?) power sensor unit is "Watt".
Can you please change "Watt" info "W" and/or deliver us an enum with Id's of all values ?
For now only the textchange will suffice imo.
Hey there @MartinHjelmare, mind taking a look at this issue as its been labeled with a integration (ozw) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Fixed.
you can consult SensorMultiLevelCCTypes.xml for all of the different units supported by the Z-Wave Specification. (These sensors evolve very quickly in the Specifications - So they are "dynamic" in OZW - Hence not a fixed ENUM lists.
The Notification CC uses W as string value for the Units while the (legacy?) power sensor unit is "Watt".
Just for your reference - The SensorMultiLevel is not going away any time soon (as far as I am aware) in the Specifications - So you will continue to see it deployed in new devices
This issue may be closed as it's fixed upstream.
Most helpful comment
Fixed.
you can consult SensorMultiLevelCCTypes.xml for all of the different units supported by the Z-Wave Specification. (These sensors evolve very quickly in the Specifications - So they are "dynamic" in OZW - Hence not a fixed ENUM lists.