Detects ZHA button click events and sequences (single click, double click and long click)

This blueprint detects ZHA 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
  • Device ieee, e.g., 00:ff:8c:0a:04:31:40:9e
  • 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.
- 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.