Core: zwave_mqtt reports undefined (to hass) units for Power.

Created on 13 May 2020  路  7Comments  路  Source: home-assistant/core

The problem

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

Environment

  • Home Assistant Core release with the issue:
  • Last working Home Assistant Core release (if known):
  • Operating environment (Home Assistant/Supervised/Docker/venv):
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs


Additional information

ozw

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.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinHjelmare picture MartinHjelmare  路  3Comments

kirichkov picture kirichkov  路  3Comments

sogeniusio picture sogeniusio  路  3Comments

TheZoker picture TheZoker  路  3Comments

bdraco picture bdraco  路  3Comments