I am using a Zooz Zen32 scene controller and I cannot seem to be able to trigger automations using entities. I am able to make it work by setting up the trigger by device. below are the yaml for both automations. The only way I am able to make the entity method work is changing the event type to KeyHeldDown. The keypressed and keypressedx2-5 event types do not trigger. I am only guessing that the entity method needs the keypressed event type to be persistent, since the state of the entity only changes to keypressed for a split second when pressing the physical button on the switch. For KeyHeldDown, it stays in that state for the duration that I hold the button down. I think I would have to build all the automation triggers by device, but I understand using entities is best practice. Hopefully, someone can point me in the right direction.
alias: Test device automation (working)
description: ""
triggers:
- device_id: 2ac8ce2g0296ac7bd56d3dcf7cc781a3
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: "001"
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 001
trigger: device
value: 0
id: shade_up
- device_id: 2ac8ce2g0296ac7bd56d3dcf7cc781a3
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: "003"
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 003
trigger: device
value: 0
id: shade_down
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- shade_up
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.window_server_front_relay_bo_1
- conditions:
- condition: trigger
id:
- shade_down
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.window_server_front_relay_bo_2
mode: single
alias: Test entity automation (not working)
description: ""
triggers:
- trigger: state
entity_id:
- event.window_server_front_switch_scene_001
attribute: event_type
to: KeyPressed
id: shade_up
- trigger: state
entity_id:
- event.window_server_front_switch_scene_003
attribute: event_type
to: KeyPressed
id: shade_down
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- shade_up
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.window_server_front_relay_bo_1
- conditions:
- condition: trigger
id:
- shade_down
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.window_server_front_relay_bo_2
mode: single