So I just made an automation and it works perfectly fine for all 5 buttons. I did turn off the relay mode on the main switch. So all 5 buttons are now just scene controllers and the load to my lights is always on.
If you’re interested in using it, it sets the state and the led color (if you want). Here’s an example automation, only add via YAML. Oh, it’s an all in 1 automation, does all lights attached to the zen32.
- alias: Button - Living Room Scene Controller LEDs
id: button_living_room_scene_controller_leds
mode: parallel
trigger:
- platform: state
entity_id:
- light.lamp1
- light.lamp2
- light.lamp3
- switch.hyperion_usb_capture
- switch.hyperion_cinema
- switch.hyperion_rainbow_swirl_fast
- light.living_room
- light.all_living_room
variables:
values:
'on': 2
'off': 3
'unavailable': 3
'unknown': 3
colors:
white: 0
blue: 1
green: 2
red: 3
config:
light.lamp1:
parameter: 2
light.lamp2:
parameter: 3
light.lamp3:
parameter: 4
switch.hyperion_usb_capture:
parameter: 5
switch.hyperion_cinema:
parameter: 5
switch.hyperion_rainbow_swirl_fast:
parameter: 5
light.living_room:
parameter: 1
light.all_living_room:
parameter: 1
value: >
{{ values.get(trigger.to_state.state) }}
state_parameter: >
{{ config.get(trigger.entity_id, {}).get('parameter') }}
color_parameter: >
{{ state_parameter + 5 if state_parameter is not none else none }}
state_good: >
{{ trigger.to_state.state in ['on', 'off'] }}
state_bad: >
{{ trigger.to_state.state in ['unavailable', 'unknown'] }}
state_off: >
{{ trigger.to_state.state == 'off' }}
color: >
{% if state_good and state_off %}
{{ colors.get('white') }}
{% elif state_bad %}
{{ colors.get('red') }}
{% else %}
None
{% endif %}
condition:
- condition: template
value_template: "{{ value is not none and state_parameter is not none }}"
action:
- <<: &target
service: zwave_js.bulk_set_partial_config_parameters
target:
device_id: f7a1fe2db74bf6a3b652301589f7cebc
data:
parameter: "{{ state_parameter }}"
value: "{{ value }}"
# Only set the color if we are 'off', 'unavailable', or 'unknown'
- condition: template
value_template: "{{ color is not none and (state_bad or state_off) }}"
- <<: *target
data:
parameter: "{{ color_parameter }}"
value: "{{ color }}"
Edit: there’s issues with the color. Don’t use this yet. I have to work out the kinks but im going for a run with friends in 15 minutes so I wont get back to it for a few hours.
Edit: Just got back from my run, everything is working as expected after making updates.
This turns the LEDs on when the lights are off. And changes the color to red when the light/switch that it controls is unavailable. You’re welcome to use it.
I had to set parameter 19 to 0. That turns off local control for the switch. This makes it so the device always supplies power to the load, and only sends out central scene notifications.
Hope this helps.
Also, this automation runs the lights if you want it. So basically 2 automations to run all the functionality for the Zen32. Just keep in mind that these should be used in yaml as they heavily rely on templates. I typically do that to minimize the amount of yaml that I have to write and it keeps the traces simple.
- alias: Button - Living Room Scene Controller
id: button_living_room_scene_controller
mode: parallel
trigger:
- platform: event
event_type: zwave_js_value_notification
variables:
device: >
{{ trigger.event.data.device_id }}
value: >
{{ trigger.event.data.value }}
label: >
{{ trigger.event.data.label }}
config:
f7a1fe2db74bf6a3b652301589f7cebc:
# Top Left Button
'Scene 001':
KeyPressed:
service: light.toggle
data:
entity_id: light.lamp1
# KeyPressed2x:
# KeyPressed3x:
# KeyPressed4x:
# KeyPressed5x:
# Top Right Button
'Scene 002':
KeyPressed:
service: light.toggle
data:
entity_id: light.lamp2
# Bottom Left Button
'Scene 003':
KeyPressed:
service: light.toggle
data:
entity_id: light.lamp3
# Bottom Right Button
'Scene 004':
KeyPressed:
service: switch.toggle
data:
entity_id: switch.hyperion_usb_capture
KeyPressed2x:
service: switch.toggle
data:
entity_id: switch.hyperion_cinema
KeyPressed3x:
service: switch.toggle
data:
entity_id: switch.hyperion_rainbow_swirl_fast
# KeyPressed4x:
# KeyPressed5x:
# Top button
'Scene 005':
KeyPressed:
service: light.toggle
data:
entity_id: light.living_room
KeyPressed2x:
service: light.toggle
data:
entity_id: light.all_living_room
service: >
{{ config.get(device, {}).get(label, {}).get(value, {}).get('service') }}
data: >
{{ config.get(device, {}).get(label, {}).get(value, {}).get('data') }}
condition:
- condition: template
value_template: "{{ service is not none and data is not none }}"
action:
- service: "{{ service }}"
data: "{{ data }}"