I’m trying to set up a simple automation to turn on a light when a door is open and turn off the same light when the door gets closed. I have not been able to figure out what to use for the trigger part of the automation. This is what I see in the logs.
I should mention that I tried using the trigger “Node status changed” from both asleep to awake and from dead to alive. I also tried “Any turned on” and “Any turned off”. There was another trigger called “Value change on a Z-Wave JS Value” but I could not figure out what I should use for the various parameters like, command_class, property, property_key. All of them were trigger type: device.
Good Morning
I just bought a few of these off someone on FB, seeing this, I know why I’ve decided to group mine.
As I added them, rename all devices with my own ## digit, sample below shows 01, 02, and 04.
Within my if block, 1=2 is a cheap comparison so that I can just copy/paste the lines after and swap in the sensors.
template:
- binary_sensor:
- name: kitchen_windows_open
state: >
{{ 1=2
or states('number.door_window_sensor_gen2_01_basic')|int > 0
or states('number.door_window_sensor_gen2_02_basic')|int > 0
or states('number.door_window_sensor_gen2_04_basic')|int > 0 }}
A bit of a pain to setup, but once its done, pretty solid.
Another option, if you want to dig deeper into configuring the device…
You can configure option 121 to issue a BINARY report, which moves the state to the “any” sensor that is created.
I found with HA 2022.6, I had to add the device, push the config, remove the device then re-add it for HA/Zwave to properly react. I also disabled the basic control entity because its not needed.