ZWave-JS - Fibaro The Button (FGPB-101) v2021.12.08

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: 
  description: "Create automations for The Button by Fibaro using the Z-Wave JS integration.\n"
  domain: automation
  input: 
    fibaro_thebutton: 
      description: "List of available The Button devices."
      name: "Fibaro The Button"
      selector: 
        device: 
          integration: zwave_js
          manufacturer: Fibargroup
          model: FGPB-101
    key_held_down: 
      default: []
      description: "Action to run when button is held down."
      name: "Held Down"
      selector: 
        action: {}
    key_pressed_1x: 
      default: []
      description: "Action to run when button is pressed once."
      name: "Pressed Once"
      selector: 
        action: {}
    key_pressed_2x: 
      default: []
      description: "Action to run when button is pressed twice."
      name: "Pressed Twice"
      selector: 
        action: {}
    key_pressed_3x: 
      default: []
      description: "Action to run when button is pressed three times."
      name: "Pressed Three Times"
      selector: 
        action: {}
    key_pressed_4x: 
      default: []
      description: "Action to run when button is pressed four times."
      name: "Pressed Four Times"
      selector: 
        action: {}
    key_pressed_5x: 
      default: []
      description: "Action to run when button is pressed five times."
      name: "Pressed Five Times"
      selector: 
        action: {}
    key_released: 
      default: []
      description: "Action to run when button is released after being held down."
      name: Released
      selector: 
        action: {}
  name: "ZWave-JS - Fibaro The Button (FGPB-101) v2021.12.08"
  source_url: "https://community.home-assistant.io/t/zwave-js-fibaro-the-button-fgpb-101-v2021-12-08/300945"
condition: "{{ trigger.event.data.device_id == device_id }}"
max_exceeded: silent
mode: single
trigger: 
  - event_type: zwave_js_value_notification
    platform: event
variables: 
  device_id: !input 'fibaro_thebutton'

action: 
  - variables: 
      command_class_name: "{{ trigger.event.data.command_class_name }}"
      label: "{{ trigger.event.data.label }}"
      node_id: "{{ trigger.event.data.node_id }}"
      property_key_name: "{{ trigger.event.data.property_key_name }}"
      property_name: "{{ trigger.event.data.property_name }}"
      value: "{{ trigger.event.data.value }}"
  - data: 
      message: "received event from node {{node_id}}: {{ command_class_name }} - {{ value }} - {{ label }}"
      name: "Z-Wave JS"
    service: logbook.log
  - choose: 
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyPressed' or value == 0)
            }}
        sequence: !input 'key_pressed_1x'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyPressed2x' or value == 3)
            }}
        sequence:  !input 'key_pressed_2x'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyPressed3x' or value ==4) 
            }}
        sequence:  !input 'key_pressed_3x'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyPressed4x' or value == 5) 
            }}
        sequence:  !input 'key_pressed_4x'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyPressed5x' or value == 6) 
            }}
        sequence:  !input 'key_pressed_5x'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyHeldDown' or value == 2) 
            }}
        sequence:  !input 'key_held_down'
      - conditions: |
            {{  property_name == 'scene' 
                and property_key_name == '001'
                and (value == 'KeyReleased' or value == 1) 
            }}
        sequence:  !input 'key_released'
3 Likes

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,…

Works great! Thank you.

Hey thank you very much.

Is it possible to add the “long press” scene too?

Best regards

I’ll work on it. Not sure if I can edit his or just make my own. I’ll link it here if I just make my own.

Just made it. Works like a charm. Have fun

1 Like

wow thank you so much :grinning:

1 Like

I have updated my blueprint taking the changes from ZWave-JS - Fibaro The Button (FGPB-101) - All Scenes and fixed a weird issue I have now (no more value == KeyPress2x,… but numerical values, does not why…)

2 Likes

Wondering if anyone could help me with the Fibaro The Button. I am still using my old SmartThings V1 hub as a zwave hub but using HA to controlling everything.

I found two The Buttons in my garage I had forgotten about but when I try to create an automation with them the only state that HA seems to know about the Button is the battery state. In the ST app which I never use I can easily create a automation based on button preferences.

When trying to use this blueprint the automation creation says : No matching devices found.

Any ideas how to get HA to recognise The Button? Thanks in advance!

Works like a charm! Thanks!!

Thanks, great Blueprint !!!

Hi,
I try to toggle a plug with my button.
I have created a new automation with this blueprint but when I press the button nothing happens.
Anything I can do to find out why?

Thanks