Difficulty recognizing state changes on Zooz Zen37

I have two pieces of hardware that I use to support my home automation setup: 1) a home assistant green, and 2) a Z-box from Zooz.

I’ve used the Z-box to set up and configure two Zen37 remotes. Those same devices now show up in Home Assistant via the Fibaro integration.

My issue is in regards to configuring Automations using these remotes. I can set up the remote to perform an action when any state change occurs. However, if I specific a particular state change–say “to: Pressed”, the trigger fails to activate. A cursory review of the logs suggests that Home Assistant recognizes these state changes (it show that the device button has been pressed), but I’m still unable to get the automation to trigger.

Is there something I’m missing when programming this automation or is this a quirk of the Zen37? Any help would be much appreciated. Thank you!

YAML Below:

platform: state
entity_id:
  - event.master_bedroom_master_bedroom_remote_66_button_1
to: Pressed
attribute: event_type

The state of an event entity is the timestamp of when it last occurred, so it’s never going to be “Pressed”. You’ll need to trigger on the change in state and then use the event_type attribute to figure out what kind of event happened. Below is the shell of the automation that I’m using for my ZEN37, though some things might be different from your set up as I have it integrated through ZWaveJS.

alias: Zooz ZEN37 Remote
trigger:
  - platform: state
    entity_id:
      - event.patio_remote_scene_001
    alias: Top Button
    id: top
  - platform: state
    entity_id:
      - event.patio_remote_scene_002
    alias: Middle Button
    id: middle
  - platform: state
    entity_id:
      - event.patio_remote_scene_003
    alias: Bottom Left Button
    id: left
  - platform: state
    entity_id:
      - event.patio_remote_scene_004
    alias: Bottom Right Button
    id: right
condition: []
action:
  - variables:
      button_event: "{{trigger.id}}-{{trigger.to_state.attributes.event_type}}"
  - choose:
      - conditions:
          - condition: template
            value_template: "{{button_event == 'top-KeyPressed'}}"
        sequence: []
        alias: Top Button Pressed
      - conditions:
          - condition: template
            value_template: "{{button_event == 'top-KeyPressed2x'}}"
        sequence: []
        alias: Top Button Pressed 2x
      - conditions:
          - condition: template
            value_template: "{{button_event == 'middle-KeyPressed'}}"
        sequence: []
        alias: Middle Button Pressed
      - conditions:
          - condition: template
            value_template: "{{button_event == 'middle-KeyPressed2x'}}"
        sequence: []
        alias: Middle Button Pressed 2x
      - conditions:
          - condition: template
            value_template: "{{button_event == 'left-KeyPressed'}}"
        sequence: []
        alias: Left Button Pressed
      - conditions:
          - condition: template
            value_template: "{{button_event == 'left-KeyPressed2x'}}"
        sequence: []
        alias: Left Button Pressed 2x
      - conditions:
          - condition: template
            value_template: "{{button_event == 'right-KeyPressed'}}"
        sequence: []
        alias: Right Button Pressed
      - conditions:
          - condition: template
            value_template: "{{button_event == 'right-KeyPressed2x'}}"
        sequence: []
        alias: Right Button Pressed 2x
mode: parallel
1 Like

That worked. Thank you!

1 Like