-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
357 lines (357 loc) · 8.62 KB
/
automations.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
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
- id: '1644331745972'
alias: '[Notify][Energy] High Consumption'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.frient_energy_monitor_power
for:
hours: 0
minutes: 0
seconds: 20
above: 4600
condition:
- condition: state
entity_id: switch.water_heater
state: 'off'
action:
- service: notify.aronne
data:
title: ⚡️ *Sto consumando troppo!*
message: I consumi hanno superato i 4.6kW per 20 secondi e il boiler è già spento,
se non spegni qualcosa salterà la corrente!
mode: single
- id: '1644433874893'
alias: '[Notify][Proxmox] High Memory Usage'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.proxmox_memory_usage
above: '13'
condition: []
action:
- service: notify.aronne
data:
title: ⚠️ *Proxmox high memory usage*
message: Superati i 13GB di RAM occupata
mode: single
- id: '1650365699588'
alias: '[Notify][Garbage Collection] Tomorrow garbage collection'
description: Send Telegram notification at 6:00PM for garbage collection occurring
the next day
trigger:
- platform: state
entity_id:
- binary_sensor.garbage_collection_tomorrow
from: 'off'
to: 'on'
for:
hours: 18
minutes: 0
seconds: 0
condition: []
action:
- service: notify.aronne
data:
title: "\U0001F6AE *Raccolta rifiuti*"
message: Domani passano a ritirare la spazzatura! [Dettagli](https://home.aronnebrivio.dev/lovelace/kitchen)
mode: single
- id: '1650473639566'
alias: Button 1 manage Piantana Sala
description: ''
trigger:
- platform: mqtt
topic: zigbee2mqtt/Button 1/action
payload: single
condition: []
action:
- service: light.toggle
data: {}
target:
entity_id: light.piantana_sala
mode: single
- id: '1650473927334'
alias: Button 2 manage Luce Letto
description: ''
trigger:
- platform: mqtt
topic: zigbee2mqtt/Button 2/action
payload: single
condition: []
action:
- service: light.toggle
data: {}
target:
entity_id: light.bed
mode: single
- id: '1651408183906'
alias: '[Energy] High consumption -> turn water heater off'
description: If energy consumption go below a threshold, turn the boiler off and
send a notification
trigger:
- platform: numeric_state
entity_id: sensor.frient_energy_monitor_power
above: 4600
condition:
- condition: state
entity_id: switch.water_heater
state: 'on'
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.water_heater
- service: notify.aronne
data:
title: "\U0001F6BF *Ho spento il boiler per limitare i consumi*"
message: I consumi istantanei hanno superato i 4.6kW, cosí ho spento il boiler
per cercare di limitarli. [Dettagli](https://iqf2y6yscdio5ilo35kpfrxbyqfpreyl.ui.nabu.casa/lovelace/kitchen)
mode: single
- id: '1651526561767'
alias: '[Boiler] Turn on at 5:00 AM on working days'
description: Turn on boiler at 5:00 AM on working days if it was off
trigger:
- platform: time
at: 05:00:00
condition:
- condition: state
entity_id: switch.water_heater
state: 'off'
- condition: time
before: '10:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
after: 01:00:00
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.water_heater
mode: single
- id: '1652082753955'
alias: '[Notify] HA Update'
description: ''
use_blueprint:
path: mdegat01/update_notifications.yaml
input:
reminder_hours: '3'
update_entities:
- update.home_assistant_supervisor_update
- update.home_assistant_core_update
- update.home_assistant_operating_system_update
mobile_app_device: da511411cc302530f0e489f1d099abbf
mobile_app_device_2: 0aa5cbd661ef17ae46ea03b9fabf7ea9
- id: '1658824207858'
alias: Re-Load Speed Test
description: Perform a Manual Speed Test when sensor goes offline
trigger:
- platform: state
entity_id:
- sensor.speedtest_download
to: unavailable
- platform: time_pattern
minutes: /1
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.speedtest_download
state: unavailable
- condition: state
entity_id: sensor.speedtest_download
state: unknown
action:
- service: homeassistant.update_entity
data: {}
target:
entity_id: sensor.speedtest_download
mode: single
- id: '1677317734499'
alias: '[NFC][PC] On'
description: ''
trigger:
- platform: tag
tag_id: 47303df8-67a6-4f83-8c66-c4198583bb2e
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.gaming_station
mode: single
- id: '1677318448444'
alias: '[NFC][Door] Exit'
description: Turn off all lights if any is on
trigger:
- platform: tag
tag_id: d9cce178-68e9-4c85-a716-3d541422e054
condition:
- condition: template
value_template: '{{ states.light|selectattr(''state'',''equalto'',''on'')|list|length
> 0 }}'
action:
- service: light.turn_off
data: {}
target:
entity_id: all
- service: climate.turn_off
data: {}
target:
entity_id: all
mode: single
- id: '1677323384344'
alias: '[NFC][Door] Enter'
description: 'Turn on entrance lights if none are on '
trigger:
- platform: tag
tag_id: d9cce178-68e9-4c85-a716-3d541422e054
condition:
- condition: template
value_template: '{{ states.light|selectattr(''state'',''equalto'',''on'')|list|length
== 0 }}'
action:
- service: light.turn_on
data: {}
target:
entity_id: light.piantana_sala
mode: single
- id: '1677479754729'
alias: '[NFC][Bed] Lights toggle'
description: Toggle bed lights
triggers:
- tag_id: 515ace01-e5e2-41fc-bc5f-1b138fb30c35
trigger: tag
conditions: []
actions:
- action: light.toggle
target:
entity_id:
- light.bed
data: {}
mode: single
- id: '1686580227765'
alias: '[Climate] Turn Bedroom AC on during night if temp above 26.2'
description: ''
trigger:
- platform: state
entity_id:
- sensor.termometro_camera_temperature
condition:
- condition: time
after: '22:30:00'
before: 08:00:00
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
- condition: numeric_state
entity_id: sensor.termometro_camera_temperature
attribute: temperature
above: 26.2
- condition: state
entity_id: climate.condizionatore_camera
state: 'off'
action:
- service: climate.turn_on
data: {}
target:
entity_id: climate.condizionatore_camera
mode: single
- id: '1687416869637'
alias: '[Climate] Turn Bedroom AC off during night if temp under 25.2'
description: ''
trigger:
- platform: state
entity_id:
- sensor.termometro_camera_temperature
condition:
- condition: time
after: '22:30:00'
before: 07:00:00
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
- condition: numeric_state
entity_id: sensor.termometro_camera_temperature
attribute: temperature
below: 25.2
- condition: state
entity_id: climate.condizionatore_camera
state: cool
action:
- service: climate.turn_off
data: {}
target:
entity_id: climate.condizionatore_camera
mode: single
- id: '1728838134324'
alias: '[NFC][Vetrina Ingresso] Light toggle'
description: Toggle vetrina ingresso light
triggers:
- trigger: tag
tag_id: 0d891f34-721d-43b2-b33d-87c570913883
conditions: []
actions:
- action: light.toggle
metadata: {}
data: {}
target:
entity_id: light.vetrina_ingresso
mode: single
- id: '1730656163756'
alias: '[Notify][Air Quality] Poor indoor AQI'
description: ''
triggers:
- entity_id:
- sensor.indoor_aqi
for:
hours: 0
minutes: 30
seconds: 0
above: 100
trigger: numeric_state
conditions:
- condition: numeric_state
entity_id: sensor.u_s_air_quality_index
attribute: state
below: 100
actions:
- data:
title: "\U0001F4A8 *Apri le finestre!*"
message: La qualità dell'aria di casa è scarsa, fai cambiare aria che non si
respira!
action: notify.aronne
mode: single
- id: '1730656544836'
alias: '[Notify][Air Quality] High Outdoor AQI'
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.u_s_air_quality_index
for:
hours: 0
minutes: 30
seconds: 0
attribute: state
above: 150
conditions: []
actions:
- data:
title: "\U0001FA9F *Chiudi tutto!*"
message: La qualità dell'aria fuori fa schifo, tappati in casa!
action: notify.aronne
mode: single