Detects ZHA (zha_event) / HUE (hue_event) button click events and sequences (single click, double click and long click)

This blueprint detects ZHA (zha_event) / HUE (hue_event) Button events and sequence. e.g. You can detect when a user clicks a sequence like this: single, double, long, single. It simulates a simple pad terminal.

You can configure this inputs:

  • Click sequence (of any length), e.g, single, long, double, single (“double” isn’t supported in HUE devices).
  • Timeout between clicks (in milliseconds), e.g., 2000
  • Start conditions. e.g., if you want detect the sequence only when a condition is true. It allows to use the same sequence under different scenarios.
  • Actions to execute when the sequence is detected.

Additionally, for ZHA devices it will need to set:

  • Device ieee, e.g., 00:ff:8c:0a:04:31:40:9e
- alias: Shield button
  use_blueprint:
    path: home/zha_event_sequence_detection.yaml
    input:
      clicks_sequence: single, long, double, single
      device_ieee: "00:ff:8c:0a:04:31:40:9e"
      conditions: "{{ states('alarm_control_panel.shield') == 'armed_away' }}"
      timeout: 2000
      actions:
        - service: alarm_control_panel.alarm_disarm
          target:
            entity_id: alarm_control_panel.shield

In this example, when the user presses this sequence: single, long, double, single and the alarm control panel is armed the alarm control panel is disarmed.

And for HUE remotes it will need to set:

  • Device id, e.g., 2ce651912371e4a13ee3a399bbd2823ee
- alias: Shield button
  use_blueprint:
    path: home/zha_event_sequence_detection.yaml
    input:
      clicks_sequence: 1_single, 2_long, 3_single
      device_id: 2ce651912371e4a13ee3a399bbd2823ee
      conditions: "{{ states('alarm_control_panel.shield') == 'armed_away' }}"
      timeout: 2000
      actions:
        - service: alarm_control_panel.alarm_disarm
          target:
            entity_id: alarm_control_panel.shield

In this example, when the user presses this sequence: single (button 1), long (button 2), single (button 3) and the alarm control panel is armed the alarm control panel is disarmed.