home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.47k stars 29.41k forks source link

OZW does not support COMMAND_CLASS_SENSOR_BINARY #44633

Closed Chris-V closed 3 years ago

Chris-V commented 3 years ago

The problem

OZW does not handle sensors that reports to COMMAND_CLASS_SENSOR_BINARY. Here I have some Sensative Strips that are configured to report as "binary sensor" instead of "notification" / alarm level.

From my understanding of https://github.com/home-assistant/core/blob/dev/homeassistant/components/ozw/binary_sensor.py, HA only uses the Notification CC to update the binary_sensor. None of the other sensors made availaible by HA represent my sensor's state.

Environment

Problem-relevant configuration.yaml

Not relevant

Traceback/Error logs

Not relevant

Additional information

Here's a full dump of a Strip node, configured to report on COMMAND_CLASS_SENSOR_BINARY: mqtt_dump.txt

And a snapshot of both the config option and the retrieved value:

OpenZWave/1/node/36/instance/1/commandclass/112/value/281475590914068/

{
  "Label": "Notification type",
  "Value": {
    "List": [
      {
        "Value": 0,
        "Label": "Binary Sensor report"
      },
      {
        "Value": 1,
        "Label": "Notification report"
      },
      {
        "Value": 2,
        "Label": "Basic report"
      }
    ],
    "Selected": "Binary Sensor report",
    "Selected_id": 0
  },
  "Units": "",
  "ValueSet": true,
  "ValuePolled": false,
  "ChangeVerified": false,
  "Min": 0,
  "Max": 0,
  "Type": "List",
  "Instance": 1,
  "CommandClass": "COMMAND_CLASS_CONFIGURATION",
  "Index": 1,
  "Node": 36,
  "Genre": "Config",
  "Help": "Set Notification type.",
  "ValueIDKey": 281475590914068,
  "ReadOnly": false,
  "WriteOnly": false,
  "Event": "valueRefreshed",
  "TimeStamp": 1609255561
}

OpenZWave/1/node/36/instance/1/commandclass/48/value/608960528/

{
  "Label": "Sensor",
  "Value": true,
  "Units": "",
  "ValueSet": true,
  "ValuePolled": false,
  "ChangeVerified": false,
  "Min": 0,
  "Max": 0,
  "Type": "Bool",
  "Instance": 1,
  "CommandClass": "COMMAND_CLASS_SENSOR_BINARY",
  "Index": 0,
  "Node": 36,
  "Genre": "User",
  "Help": "Binary Sensor State",
  "ValueIDKey": 608960528,
  "ReadOnly": true,
  "WriteOnly": false,
  "Event": "valueChanged",
  "TimeStamp": 1609281332
}
probot-home-assistant[bot] commented 3 years ago

Hey there @cgarwood, @marcelveldt, @martinhjelmare, mind taking a look at this issue as its been labeled with an integration (ozw) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

Chris-V commented 3 years ago

Nevermind that, I totally missed the other binary_sensor named "Sensor". It actually represents the sensor_binary CC!