-
Notifications
You must be signed in to change notification settings - Fork 33
/
homematicip_local-actions-for-8-button.yaml
188 lines (188 loc) · 6.24 KB
/
homematicip_local-actions-for-8-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
blueprint:
name: Actions for 8-Button Homematic(IP) device
description:
When a button is pressed, the defined actions will be executed. Please
keep in mind, that long-press actions might be executed multiple times, according
to your configured minimum duration for long press. This can be configured in
your CCU.
Tested with HmIP-RC8. Should work with other device too.
v2022-10-28
domain: automation
source_url: https://github.com/sukramj/custom_homematic/blob/devel/blueprints/automation/homematicip_local-actions-for-8-button.yaml
input:
remote:
name: 8-Button Device
description: Please select a 8-Button device of your Homematic(IP) Local integration.
selector:
device:
integration: homematicip_local
action_1_short:
name: Action
description: Button 1, Short Press
default: []
selector:
action: {}
action_1_long:
name: Action
description: Button 1, Long Press
default: []
selector:
action: {}
action_2_short:
name: Action
description: Button 2, Short Press
default: []
selector:
action: {}
action_2_long:
name: Action
description: Button 2, Long Press
default: []
selector:
action: {}
action_3_short:
name: Action
description: Button 3, Short Press
default: []
selector:
action: {}
action_3_long:
name: Action
description: Button 3, Long Press
default: []
selector:
action: {}
action_4_short:
name: Action
description: Button 4, Short Press
default: []
selector:
action: {}
action_4_long:
name: Action
description: Button 4, Long Press
default: []
selector:
action: {}
action_5_short:
name: Action
description: Button 5, Short Press
default: []
selector:
action: {}
action_5_long:
name: Action
description: Button 5, Long Press
default: []
selector:
action: {}
action_6_short:
name: Action
description: Button 6, Short Press
default: []
selector:
action: {}
action_6_long:
name: Action
description: Button 6, Long Press
default: []
selector:
action: {}
action_7_short:
name: Action
description: Button 7, Short Press
default: []
selector:
action: {}
action_7_long:
name: Action
description: Button 7, Long Press
default: []
selector:
action: {}
action_8_short:
name: Action
description: Button 8, Short Press
default: []
selector:
action: {}
action_8_long:
name: Action
description: Button 8, Long Press
default: []
selector:
action: {}
trigger:
- platform: event
event_type: homematic.keypress
event_data:
device_id: !input "remote"
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 1 }}"
sequence: !input "action_1_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 1 }}"
sequence: !input "action_1_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 2 }}"
sequence: !input "action_2_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 2 }}"
sequence: !input "action_2_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 3 }}"
sequence: !input "action_3_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 3 }}"
sequence: !input "action_3_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 4 }}"
sequence: !input "action_4_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 4 }}"
sequence: !input "action_4_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 5 }}"
sequence: !input "action_5_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 5 }}"
sequence: !input "action_5_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 6 }}"
sequence: !input "action_6_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 6 }}"
sequence: !input "action_6_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 7 }}"
sequence: !input "action_7_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 7 }}"
sequence: !input "action_7_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 8 }}"
sequence: !input "action_8_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 8 }}"
sequence: !input "action_8_long"
mode: parallel
max: 10