I was looking for a simple way to use a single push of the Fibaro Button to toggle a light. A lot of examples I found were very flexible in the use of the button but complicated. After adding the button normally as a ZWave device, this simple automation worked so I thought I would share.
(FYI: if you need to find the device id: Settings, Devices, select the button device - the device ID is the last part of the resultant URL.).
If you leave the value_raw line out it will fire anytime the button is pushed. Adding this line allows you to fire only for a certain number of pushes/holds. The values are not consistent but you can find them via the Developer tools and events. Listen to the zwave_js_value_notification and then press/hold the appropriate button the desired number of times.
alias: Fibaro "The Button" toggle
description: Toggle light with button push
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: xxxx
property_key: "001"
# optional line to detect numbers of presses (0=1 press) and holds
value_raw: 0
condition: []
action:
- type: toggle
device_id: yyyy
entity_id: zzzz
domain: switch
mode: single
or an alternative trigger you can toggle with:
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: xxxx
label: Scene 001