ZWave-JS - Fibaro The Button (FGPB-101)

Tags: #<Tag:0x00007fc41ddf7e68> #<Tag:0x00007fc41ddf7d00>

Hello

I have started a blueprint for the scene activation when pressing the only button of The Button by Fibaro:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Fibaro The Button (Z-Wave JS)
  description: |
    Create automations for The Button by Fibaro using the Z-Wave JS integration.

  domain: automation
  input:
    fibaro_thebutton:
      name: Fibaro The Button
      description: List of available The Button devices.
      selector:
        device:
          integration: zwave_js
          manufacturer: Fibargroup
          model: FGPB-101
    key_pressed_1x:
      name: Pressed Once
      description: Action to run when button is pressed once.
      default: []
      selector:
        action:
    key_pressed_2x:
      name: Pressed Twice
      description: Action to run when button is pressed twice.
      default: []
      selector:
        action:
    key_pressed_3x:
      name: Pressed Three Times
      description: Action to run when button is pressed three times.
      default: []
      selector:
        action:
    key_pressed_4x:
      name: Pressed Four Times
      description: Action to run when button is pressed four times.
      default: []
      selector:
        action:
    key_pressed_5x:
      name: Pressed Five Times
      description: Action to run when button is pressed five times.
      default: []
      selector:
        action:
  source_url: https://community.home-assistant.io/t/zwjs-fibaro-the-button-fgpb-101/300945
mode: single
max_exceeded: silent
variables:
  device_id: !input "fibaro_thebutton"
trigger:
  - platform: event
    event_type: zwave_js_value_notification
condition: "{{ trigger.event.data.device_id == device_id }}"
action:
  - variables:
      property_key_name: "{{ trigger.event.data.property_key_name }}"
      property_name: "{{ trigger.event.data.property_name }}"
      label: "{{ trigger.event.data.label }}"
      command_class_name: "{{ trigger.event.data.command_class_name }}"
      value: "{{ trigger.event.data.value }}"
      node_id:  "{{ trigger.event.data.node_id }}"
  - service: logbook.log
    data:
      name: Z-Wave JS
      message: "received event from node {{node_id}}: {{ command_class_name }} - {{ value }} - {{ label }}"
  - choose:
      - conditions: |
          {{  property_name == 'scene' 
              and property_key_name == '001'
              and value == 'KeyPressed' }}
        sequence: !input "key_pressed_1x"
      - conditions: |
          {{  property_name == 'scene' 
              and property_key_name == '001'
              and value == 'KeyPressed2x' 
          }}
        sequence: !input "key_pressed_2x"
      - conditions: |
          {{  property_name == 'scene' 
              and property_key_name == '001'
              and value == 'KeyPressed3x' 
          }}
        sequence: !input "key_pressed_3x"
      - conditions: |
          {{  property_name == 'scene' 
              and property_key_name == '001'
              and value == 'KeyPressed4x' 
          }}
        sequence: !input "key_pressed_4x"
      - conditions: |
          {{  property_name == 'scene' 
              and property_key_name == '001'
              and value == 'KeyPressed5x' 
          }}
        sequence: !input "key_pressed_5x"

Note: on my setup, only scene 1 works. double click does not send any zwave event, triple click sends scene 4, 4 click sends scene 5,…