-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththebuttom
101 lines (100 loc) · 3.53 KB
/
thebuttom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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'