Forked from ntthhtl/zwavejs-fibaro_fgs2x3_scenes.yaml
Last active
January 25, 2022 12:22
-
-
Save kristofer84/7227aade8cab731553997745333076df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: ZWave-JS - Fibaro Dimmer 2 and Single/Double Switch (FGD212/FGS213/FGS223) Scenes | |
description: | | |
Create automations to react button scenes from Fibaro Dimmer 2 or Single/Double Switch. | |
Make sure that device Z-wave parameters 27 and 28 are set correctly. | |
domain: automation | |
input: | |
device: | |
name: Device | |
description: A Fibaro Switch device that supports scenes. | |
selector: | |
device: | |
integration: zwave_js | |
manufacturer: Fibargroup | |
scene: | |
name: Button / Scene | |
description: Choose scene 1 for S1, 2 for S2 button | |
selector: | |
select: | |
options: | |
- "1" | |
- "2" | |
keypressed: | |
name: Key Pressed 1 time | |
description: Actions to run for a single tap on. | |
default: [] | |
selector: | |
action: | |
keypressed2x: | |
name: Key Pressed 2 times | |
description: Actions to run for a double tap on. | |
default: [] | |
selector: | |
action: | |
keypressed3x: | |
name: Key Pressed 3 times | |
description: Actions to run for a triple tap on. | |
default: [] | |
selector: | |
action: | |
keyhelddown: | |
name: Key Held Down | |
description: Actions to run for a key held down | |
default: [] | |
selector: | |
action: | |
keyreleased: | |
name: Key Released | |
description: Actions to run for a key release. | |
default: [] | |
selector: | |
action: | |
variables: | |
scene: !input 'scene' | |
mode: single | |
max_exceeded: silent | |
trigger: | |
platform: event | |
event_type: zwave_js_value_notification | |
event_data: | |
device_id: !input device | |
condition: | |
condition: and | |
conditions: | |
- '{{ trigger.event.data.command_class_name in [''Scene Activation'', ''Central Scene''] }}' | |
- condition: or | |
conditions: | |
- '{{ trigger.event.data.value is not none and scene == (trigger.event.data.value | string)[0:1] }}' | |
- '{{ trigger.event.data.property_key is not none and scene == trigger.event.data.property_key[2:3] }}' | |
action: | |
- variables: | |
action: "{{ trigger.event.data.value }}" | |
- choose: | |
- conditions: "{{ action == 16 or action == 26 or action == 'KeyPressed' }}" | |
sequence: !input keypressed | |
- choose: | |
- conditions: "{{ action == 14 or action == 24 or action == 'KeyPressed2x' }}" | |
sequence: !input keypressed2x | |
- choose: | |
- conditions: "{{ action == 25 or action == 'KeyPressed3x' }}" | |
sequence: !input keypressed3x | |
- choose: | |
- conditions: "{{ action == 13 or action == 23 or action == 'KeyHeldDown' }}" | |
sequence: !input keyhelddown | |
- choose: | |
- conditions: "{{ action == 12 or action == 22 or action == 'KeyReleased' }}" | |
sequence: !input keyreleased |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment