Unsure how to read ZWave door sensor status

I’ve started using home assistant this weekend and bought a Sensitive Strips door sensor. I’ve confirmed that the Access Control state changes from 22 (open) to 23 (closed) using the Open ZWave Control Panel. I’m now trying to make the home assistant GUI pick up the open/closed state, but I can’t seem to get that to work.

I’ve added this binary_sensor:

binary_sensor:
  - platform: template
    sensors:
      pantry_door:
        friendly_name: "Pantry door"
        device_class: "Door"

Which I now try to respond to the Access Control state of the Sensitive Strips sensor (which, by the way, still shows up as “Probe”, not sure if that’s a problem?). I named it pantry_door and I can see it in the node list.

I’ve tried the following:

value_template: "{{ is_state('binary_sensor.pantry_door.attributes[\"Access Control\"]', '22') }}"

value_template: "{{ is_state('states.binary_sensor.pantry_door.attributes[\"Access Control\"]', '22') }}"

value_template: "{{ is_state('zwave.pantry_door.access_control', '22') }}"

value_template: "{{ is_state('binary_sensor.pantry_door.access_control', '22') }}"

Unsure how to proceed from here. How do I read the Access Control state?

To get the state value, the value_template should be something like:
‘{{ states.zwave.pantry_door.attributes.access_control }}’

Like this, which also includes a template binary sensor example for you.

However, you can use the control panel and enable the binary sensor. Set the Notification type to Binary Sensor report.

No, that’s perfectly normal for battery powered devices, since they spend most of their time in the sleep state. How often they wake up varies from device to device, some wake up every few hours, some once a week (and all the options in between).

Thanks. Both links link to the same page, I can’t seem to figure out how to change the Notification type using the control panel of HA?

Sorry, I should have linked here.

That said, all the Z-Wave docs are grouped together - it’s worth reading them all :wink:

Thanks. I’ve tried it a couple of times, but after a reboot of the system, the original config is still active (notification type: Notification report). I wake up the device, select the node, find the config parameter and change it to Binary sensor report. Then I restart the system and the old value is selected again (also in Open ZWave Control Panel). Any ideas?

Edit: It worked after the third time.

Still can’t get it to work. These are my entities:

The Notification Type is set to Binary Sensor Report.

And my config:

binary_sensor:
  - platform: template
    sensors:
      pantry_door:
        friendly_name: "Pantry door"
        device_class: "Door"
        value_template: >-
          {%- if is_state('sensor.pantry_door_sensor_access_control', '22') -%}
          true
          {%- else -%}
          false
          {%- endif -%}

What am I doing wrong still?

There’s no need to restart the system. You should also wake the device after you set the config parameter, not before.

Then you don’t need to make your own, but you should now find two entities in <> (dev-states), one binary_sensor.pantry_door_sensor and binary_sensor.pantry_door. Those should show on when you open the door.

That should be

device_class: door

Thanks for your patience!

I went to dev-states and found one entity that responds to the door, it’s called binary_sensor.sensor_2 and goes to on/off when the door is opened or closed. I wonder why it got such a random name (which is also not in the list from the screenshot)? I did remove/add the sensor from/to the controller at some point to start with a clean slate.

And I see that I now don’t have to declare my own binary_sensor anymore, I can simply add binary_sensor.sensor_2 to a view. What’s best practice in getting it to show a door layout (open/closed) rather than on/off?

device_class: door will do that.

I understand that, but binary_sensor.sensor_2 is not something I’ve defined in the configuration.

So it looks like I can’t just do this:

binary_sensor:
  - platform: template
    sensors:
      sensor_2:
        device_class: door

That doesn’t work at least.

Use customization. e.g.

customize:
  binary_sensor.sensor_2:
    friendly_name: Pantry Door
    device_class: door
1 Like

That works, thanks!