-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathFibaro_Button_Blueprint.yaml
114 lines (96 loc) · 3.15 KB
/
Fibaro_Button_Blueprint.yaml
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
102
103
104
105
106
107
108
109
110
111
112
113
114
blueprint:
name: Fibaro Button Actions
description: >
Define actions for a Fibaro button for various events like KeyPressed, KeyHeldDown, KeyPressed2x, etc.
domain: automation
input:
fibaro_button:
name: Fibaro Button
description: Select your Fibaro button device.
selector:
device: {}
action_key_pressed:
name: Action for KeyPressed
description: Action to run when the button is pressed once.
default: []
selector:
action: {}
action_key_released:
name: Action for KeyReleased
description: Action to run when the button is released.
default: []
selector:
action: {}
action_key_held_down:
name: Action for KeyHeldDown
description: Action to run when the button is held down.
default: []
selector:
action: {}
action_key_pressed_2x:
name: Action for KeyPressed2x
description: Action to run when the button is pressed twice.
default: []
selector:
action: {}
action_key_pressed_3x:
name: Action for KeyPressed3x
description: Action to run when the button is pressed three times.
default: []
selector:
action: {}
action_key_pressed_4x:
name: Action for KeyPressed4x
description: Action to run when the button is pressed four times.
default: []
selector:
action: {}
action_key_pressed_5x:
name: Action for KeyPressed5x
description: Action to run when the button is pressed five times.
default: []
selector:
action: {}
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input fibaro_button
command_class: 91
property: scene
condition: []
action:
# - service: persistent_notification.create
# data:
# title: Fibaro Button Event
# message: "Event data: {{ trigger.event.data }}"
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyPressed' }}"
sequence: !input action_key_pressed
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyReleased' }}"
sequence: !input action_key_released
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyHeldDown' }}"
sequence: !input action_key_held_down
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyPressed2x' }}"
sequence: !input action_key_pressed_2x
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyPressed3x' }}"
sequence: !input action_key_pressed_3x
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyPressed4x' }}"
sequence: !input action_key_pressed_4x
- conditions:
- condition: template
value_template: "{{ trigger.event.data.value == 'KeyPressed5x' }}"
sequence: !input action_key_pressed_5x
default: []