Difficulty recognizing state changes on Zooz Zen37

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