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

This is directly taken from the blueprint for the Fibaro “The Button” created by @gsemet . All I did was add the held and released actions. Enjoy!

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: {}
    key_held_down:
      name: Held Down
      description: Action to run when button is held down.
      default: []
      selector:
        action: {}
    key_released:
      name: Released
      description: Action to run when button is released after being held down.
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/zwave-js-fibaro-the-button-fgpb-101-all-scenes/329260
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' \n    and property_key_name == '001'\n\
      \    and value == 'KeyPressed' }}\n"
    sequence: !input 'key_pressed_1x'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyPressed2x' \n}}\n"
    sequence: !input 'key_pressed_2x'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyPressed3x' \n}}\n"
    sequence: !input 'key_pressed_3x'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyPressed4x' \n}}\n"
    sequence: !input 'key_pressed_4x'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyPressed5x' \n}}\n"
    sequence: !input 'key_pressed_5x'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyHeldDown' \n}}\n"
    sequence: !input 'key_held_down'
  - conditions: "{{  property_name == 'scene' \n    and property_key_name == '001'\n\
      \    and value == 'KeyReleased' \n}}\n"
    sequence: !input 'key_released'
3 Likes

Now it’s complete! Thank you so much

1 Like

Hey! can you make blueprint this work with the FGGC001 Swipe? It uses the same central scene command

Hey, sorry I don’t have this device. Hopefully someone else has it and can give it a shot.

Thanks for this. Seems to be working.

One thing. For all the action: {} I see Incorrect type. Expected “null”.

Is that ok?

Hmmm, when do you see that? I’m not seeing that at all. Is that in the logs?

I have updated my blueprint because the “value” I receive now are no more in the form “KeyPress2x”,… but numerical values, and it did not worked anymore.

1 Like

I’ve imported the blueprint for the Fibaro “The Button” into home assistant. I would like to trigger an event on the several button press actions and react to these events in Node Red. How do I have to specify the automation that I can identify, which of the three buttons have been used?