Repository navigation
Expand file tree
/
Copy pathscripts.yaml
More file actions
316 lines (316 loc) · 7.93 KB
/
Copy pathscripts.yaml
File metadata and controls
316 lines (316 loc) · 7.93 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
routine_buonanotte:
sequence:
- action: light.turn_off
metadata: {}
target:
entity_id: light.all_basement
data: {}
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.sonoff_10001f9bcf
data: {}
- action: light.turn_on
metadata: {}
target:
entity_id:
- light.lampada_sala_rgb
data:
hs_color:
- 120
- 100
- delay:
hours: 0
minutes: 0
seconds: 7
milliseconds: 0
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.lampada_sala_bianco
- light.lampada_sala_rgb
data: {}
alias: Routine Buonanotte
description: ''
icon: mdi:weather-night
announce_on_alexa_speaker:
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.do_not_disturb
state:
- 'on'
- condition: and
conditions:
- condition: template
value_template: '{{ not (is_critical | default(false)) }}'
sequence:
- action: notify.pushover
metadata: {}
data:
message: "\U0001F515 {{ message }}"
title: Notifica di Alexa
- conditions:
- condition: template
value_template: '{{ sound_name is defined and sound_name is not none and sound_name
| length > 0 }}'
sequence:
- action: media_player.play_media
data:
media:
media_content_id: chiedi a Mia Lista riproduci {{ sound_name }}
media_content_type: custom
metadata: {}
target:
entity_id: group.media_players
- conditions: []
sequence:
- action: notify.alexa_media
metadata: {}
data:
target:
- media_player.echo_soggiorno
- media_player.echo_dot_taverna
data:
type: announce
message: '{{ message }}'
enabled: true
fields:
message:
selector:
text:
name: Messaggio
description: Messaggio da annunciare sugli speaker
required: true
sound_name:
selector:
text:
name: Suono
description: Suono da riprodurre sugli speaker
is_critical:
selector:
boolean:
name: Critico
description: Permette di bypassare la modalità non disturbare
alias: Annuncia su speaker Alexa
description: ''
manage_gewiss_via_ifttt:
sequence:
- if:
- condition: template
value_template: '{{ is_on }}'
then:
- action: input_boolean.turn_on
metadata: {}
target:
entity_id: '{{ entita_stato_luce }}'
data: {}
enabled: false
else:
- action: input_boolean.turn_off
metadata: {}
target:
entity_id: '{{ entita_stato_luce }}'
data: {}
enabled: false
- action: ifttt.trigger
metadata: {}
data:
event: '{{ ifttt_event_name }}'
fields:
entita_stato_luce:
selector:
entity:
multiple: false
include_entities:
- input_boolean.luce_cucina_principale
- input_boolean.luce_cucina_centrale
- input_boolean.luce_sala
- input_boolean.luce_giardino
- input_boolean.luce_esterno_ingresso
- input_boolean.luce_esterno_taverna
- input_boolean.luce_scale
required: true
name: Entità stato luce
description: Entità con lo stato della luce Gewiss
ifttt_event_name:
selector:
text:
description: Nome dell'evento per il webhook di IFTTT
name: Nome Evento IFTTT
required: true
is_on:
selector:
boolean:
name: Accendi luce
required: true
alias: Accendi/spegni luce Gewiss tramite IFTTT
description: ''
mode: parallel
max: 10
routine_serale:
sequence:
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.luce_cucina_centrale
- light.luce_cucina_principale
- light.luce_sala
data: {}
enabled: true
- action: light.turn_on
metadata: {}
target:
entity_id: light.lampada_sala_rgb
data:
hs_color:
- 240
- 100
- action: media_player.turn_on
metadata: {}
target:
entity_id: media_player.tv_sala
data: {}
enabled: false
- action: button.press
metadata: {}
target:
entity_id: button.wake_on_lan_d8_e0_e1_c6_74_56
data: {}
alias: Relax serale
description: ''
riavvia_monitor_xiaomi:
sequence:
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.gosund_presa03
data: {}
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- action: switch.turn_on
metadata: {}
target:
entity_id: switch.gosund_presa03
data: {}
alias: Riavvia monitor Xiaomi
description: ''
notifica:
alias: Notifica
description: "Punto unico per l'invio delle notifiche. \ntecnico = Telegram personale\ncasa
= gruppo Telegram A&E Home\nannuncio = Alexa (o Telegram)\ncritico = tutti i canali"
mode: parallel
max: 10
fields:
tipo:
name: Tipo
required: true
selector:
select:
options:
- tecnico
- casa
- annuncio
- critico
messaggio:
name: Messaggio
required: true
selector:
text:
multiline: true
titolo:
name: Titolo
required: false
selector:
text:
variables:
telegram_tecnico: notify.telegram_bot_458417471_38061565
telegram_casa: notify.telegram_bot_458417471_220682073
push_critico:
- notify.mobile_app_iphone_17_di_andrea
- notify.mobile_app_iphone_di_erica
speaker_annunci:
- media_player.echo_soggiorno
- media_player.echo_dot_taverna
testo: '{% set t = titolo | default('''') %}{{ (t ~ ''\n'') if t else '''' }}{{
messaggio }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ tipo == ''tecnico'' }}'
sequence:
- action: notify.send_message
target:
entity_id: '{{ telegram_tecnico }}'
data:
message: "\U0001F6E0️ {{ testo }}"
- conditions:
- condition: template
value_template: '{{ tipo == ''casa'' }}'
sequence:
- action: notify.send_message
target:
entity_id: '{{ telegram_casa }}'
data:
message: '{{ testo }}'
- conditions:
- condition: template
value_template: '{{ tipo == ''annuncio'' }}'
sequence:
- if:
- condition: state
entity_id: input_boolean.do_not_disturb
state: 'on'
then:
- action: notify.send_message
target:
entity_id: '{{ telegram_casa }}'
data:
message: "\U0001F515 {{ testo }}"
else:
- action: notify.alexa_media
data:
target: '{{ speaker_annunci }}'
message: '{{ messaggio }}'
data:
type: announce
- conditions:
- condition: template
value_template: '{{ tipo == ''critico'' }}'
sequence:
- parallel:
- repeat:
for_each: '{{ push_critico }}'
sequence:
- action: '{{ repeat.item }}'
continue_on_error: true
data:
title: "{{ titolo | default('\U0001F6A8 Allarme casa') }}"
message: '{{ messaggio }}'
data:
push:
interruption-level: critical
sound:
name: default
critical: 1
volume: 1
- action: notify.send_message
continue_on_error: true
target:
entity_id: '{{ telegram_casa }}'
data:
message: "\U0001F6A8 {{ testo }}"
- action: notify.alexa_media
continue_on_error: true
data:
target: '{{ speaker_annunci }}'
message: '{{ messaggio }}'
data:
type: announce