forked from myGithub-Markus/home-assistant_blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeconz_friends_of_hue_smart_switch_fourfold_button.yaml
191 lines (188 loc) · 5.81 KB
/
deconz_friends_of_hue_smart_switch_fourfold_button.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
blueprint:
name: deCONZ - Philips Friends of Hue Smart Switch (4 buttons)
description: >
Philips Friends of Hue Smart Switch (4 buttons), like senic https://de.senic.com based on PTM 215ZE EnOcean Alliance
domain: automation
source_url: https://github.com/myGithub-Markus/home-assistant_blueprints/blob/main/deconz_friends_of_hue_smart_switch_fourfold_button.yaml
input:
remote:
name: Remote
description: Senic remote
selector:
device:
integration: deconz
manufacturer: PhilipsFoH
model: FOHSWITCH
button_one_single_press:
name: 1 button - Single press
description: Action to run on a single press of the button 1
default: []
selector:
action: {}
button_one_hold_in:
name: 1 button - Hold in
description: Action to run when button 1 held in
default: []
selector:
action: {}
button_one_hold_release:
name: 1 button - Hold release
description: Action to run when button 1 was held in and released
default: []
selector:
action: {}
button_two_single_press:
name: 2 button - Single press
description: Action to run on a single press of the button 2
default: []
selector:
action: {}
button_two_hold_in:
name: 2 button - hold in
description: Action to run when button 2 held in
default: []
selector:
action: {}
button_two_hold_release:
name: 2 button - Hold release
description: Action to run when button 2 was held in and released
default: []
selector:
action: {}
button_three_single_press:
name: 3 button - Single press
description: Action to run on a single press of the button 3
default: []
selector:
action: {}
button_three_hold_in:
name: 3 button - hold in
description: Action to run when button 3 held in
default: []
selector:
action: {}
button_three_hold_release:
name: 3 button - Hold release
description: Action to run when button 3 was held in and released
default: []
selector:
action: {}
button_four_single_press:
name: 4 button - Single press
description: Action to run on a single press of the button 4
default: []
selector:
action: {}
button_four_hold_in:
name: 4 button - hold in
description: Action to run when button 4 held in
default: []
selector:
action: {}
button_four_hold_release:
name: 4 button - Hold release
description: Action to run when button 4 was held in and released
default: []
selector:
action: {}
both_buttons_one_and_two_single_press:
name: Both buttons 1 + 2 - Single press
description: Action to run on a single press of both buttons 1 + 2
default: []
selector:
action: {}
both_buttons_one_and_two_hold_in:
name: Both buttons 1 + 2 - hold in
description: Action to run when both buttons 1 + 2 held in
default: []
selector:
action: {}
both_buttons_one_and_two_hold_release:
name: Both buttons 1 + 2 - Hold release
description: Action to run when both buttons 1 + 2 were held in and released
default: []
selector:
action: {}
both_buttons_three_and_four_single_press:
name: Both buttons 3 + 4 - Single press
description: Action to run on a single press of both buttons 3 + 4
default: []
selector:
action: {}
both_buttons_three_and_four_hold_in:
name: Both buttons 3 + 4 - hold in
description: Action to run when both buttons 3 + 4 held in
default: []
selector:
action: {}
both_buttons_three_and_four_hold_release:
name: Both buttons 3 + 4 - Hold release
description: Action to run when both buttons 3 + 4 were held in and released
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: deconz_event
event_data:
device_id: !input 'remote'
action:
- variables:
event: '{{ trigger.event.data.event }}'
- choose:
- conditions:
- '{{ event == 1001 }}'
sequence: !input 'button_one_hold_in'
- conditions:
- '{{ event == 1002 }}'
sequence: !input 'button_one_single_press'
- conditions:
- '{{ event == 1003 }}'
sequence: !input 'button_one_hold_release'
- conditions:
- '{{ event == 2001 }}'
sequence: !input 'button_two_hold_in'
- conditions:
- '{{ event == 2002 }}'
sequence: !input 'button_two_single_press'
- conditions:
- '{{ event == 2003 }}'
sequence: !input 'button_two_hold_release'
- conditions:
- '{{ event == 3001 }}'
sequence: !input 'button_three_hold_in'
- conditions:
- '{{ event == 3002 }}'
sequence: !input 'button_three_single_press'
- conditions:
- '{{ event == 3003 }}'
sequence: !input 'button_three_hold_release'
- conditions:
- '{{ event == 4001 }}'
sequence: !input 'button_four_hold_in'
- conditions:
- '{{ event == 4002 }}'
sequence: !input 'button_four_single_press'
- conditions:
- '{{ event == 4003 }}'
sequence: !input 'button_four_hold_release'
- conditions:
- '{{ event == 5001 }}'
sequence: !input 'both_buttons_one_and_two_hold_in'
- conditions:
- '{{ event == 5002 }}'
sequence: !input 'both_buttons_one_and_two_single_press'
- conditions:
- '{{ event == 5003 }}'
sequence: !input 'both_buttons_one_and_two_hold_release'
- conditions:
- '{{ event == 6001 }}'
sequence: !input 'both_buttons_three_and_four_hold_in'
- conditions:
- '{{ event == 6002 }}'
sequence: !input 'both_buttons_three_and_four_single_press'
- conditions:
- '{{ event == 6003 }}'
sequence: !input 'both_buttons_three_and_four_hold_release'