-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
426 lines (422 loc) · 9.76 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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
- id: '1601119773176'
alias: OTGW Enable ATAG ECO
description: ''
trigger:
- platform: time_pattern
minutes: /30
condition: []
action:
- service: mqtt.publish
data:
topic: set/otgw/hot_water/enable
payload: 0
mode: single
- id: '1601121160850'
alias: Pond Pump Solar Auto On
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.battery_voltage
for: 00:04:00
above: '13.4'
- platform: numeric_state
entity_id: sensor.solar_panel_power
above: '4.0'
for: 00:04:00
condition:
- condition: numeric_state
entity_id: sensor.solar_panel_power
above: '1'
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.pond_pump_auto_switched
- service: switch.turn_on
data: {}
entity_id: switch.pump_switch
mode: restart
- id: '1601121355747'
alias: Pond Pump Solar Auto Off
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.solar_panel_power
for: 00:10:00
below: '4'
condition: []
action:
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.pond_pump_auto_switched
- service: switch.turn_off
data: {}
entity_id: switch.pump_switch
mode: restart
- id: '1601121501673'
alias: Bathroom fan On
description: ''
trigger:
- platform: numeric_state
entity_id: binary_sensor.dhw_bathroom_temperature_trend
above: '0.1'
attribute: gradient
for: 00:00:10
condition:
- condition: time
after: 06:30
before: '23:59'
action:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
mode: restart
- id: '1601121557392'
alias: Bathroom Fan Off Long
description: Includes variable delay
trigger:
- platform: state
from: 'on'
to: 'off'
entity_id: binary_sensor.dhw_sensor
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- delay: '{{ ''00:{}''.format(states(''sensor.dhw_sensor_time_increment'')[-5:])
}}'
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
mode: parallel
max: 10
- id: '1601121864100'
alias: DHW Sensor increment time
description: ''
trigger:
- platform: time_pattern
seconds: /5
condition:
- condition: state
entity_id: binary_sensor.dhw_sensor
state: 'on'
action:
- service: homeassistant.update_entity
data: {}
entity_id: sensor.dhw_sensor_time_increment
mode: single
- id: '1601122517939'
alias: DHW Sensor on time
description: Time that the DHW sensor switches on
trigger:
- platform: state
entity_id: binary_sensor.dhw_sensor
from: 'off'
to: 'on'
condition: []
action:
- data_template:
date: '{{ now().timestamp() | timestamp_custom("%Y-%m-%d", true) }}
'
time: '{{ now().timestamp() | timestamp_custom("%H:%M:%S", true) }}
'
entity_id: input_datetime.dhw_sensor_on
service: input_datetime.set_datetime
mode: single
- id: '1601122872891'
alias: DHW Sensor off time
description: Time that the DHW sensor switches off
trigger:
- platform: state
entity_id: binary_sensor.dhw_sensor
from: 'on'
to: 'off'
condition: []
action:
- data_template:
date: '{{ now().timestamp() | timestamp_custom("%Y-%m-%d", true) }}
'
entity_id: input_datetime.dhw_sensor_off
time: '{{ now().timestamp() | timestamp_custom("%H:%M:%S", true) }}
'
entity_id: input_datetime.dhw_sensor_off
service: input_datetime.set_datetime
mode: single
- id: '1601123312636'
alias: Home assistant startup - All switches off
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: switch.turn_off
data: {}
entity_id: switch.pump_switch
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.smartplug
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.shelly1_a4cf12f41fd4
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.shelly1_a4cf12f46677
- service: switch.turn_off
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
mode: single
- id: '1601151093811'
alias: Pond Pump Auto off
description: 60 mins limit after manual switch on
trigger:
- platform: state
entity_id: switch.pump_switch
to: 'on'
for: 00:60:00
condition:
- condition: state
entity_id: input_boolean.pond_pump_auto_switched
state: 'off'
action:
- service: switch.turn_off
data: {}
entity_id: switch.pump_switch
mode: single
- id: '1601151392561'
alias: Set ATAG Outside Temp
description: ''
trigger:
- platform: time_pattern
minutes: /30
condition: []
action:
- service: shell_command.run_ad5252
data: {}
mode: single
- id: '1604180361250'
alias: Coming home coffee
description: ''
trigger:
- platform: zone
entity_id: device_tracker.iphonexr
zone: zone.cycling_home
event: enter
condition:
- condition: time
before: '13:30'
after: '10:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- type: turn_on
device_id: d2ed512eff6411ea9dc23d4336761f0a
entity_id: switch.smartplug
domain: switch
mode: single
- id: '1604346592877'
alias: OTGW follow Evohome
description: ''
trigger:
- platform: state
entity_id: sensor.otgw_evohome_setpoint
for: 00:00:10
condition:
- condition: numeric_state
entity_id: sensor.otgw_evohome_setpoint
below: '70'
above: '15'
- condition: time
after: 06:00:00
before: '23:59:59'
action:
- service: mqtt.publish
data:
topic: set/otgw/max_modulation
payload: '{{ states.sensor.otgw_boiler_max_modulation_adjusted.state }}'
- service: mqtt.publish
data:
topic: set/otgw/control_setpoint
payload: '{{ states.sensor.otgw_evohome_setpoint.state }}'
- service: mqtt.publish
data:
topic: set/otgw/central_heating/enable
payload: 1
mode: restart
- id: '1604354760012'
alias: OTGW follow Evohome = 10.0
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.otgw_evohome_setpoint
for: 00:03:00
below: '15'
condition: []
action:
- service: mqtt.publish
data:
topic: set/otgw/control_setpoint
payload: 10
- service: mqtt.publish
data:
topic: set/otgw/central_heating/enable
payload: 0
- service: mqtt.publish
data:
topic: set/otgw/max_modulation
payload: 0
mode: single
- id: '1609165451438'
alias: Bathroom fan On 2
description: ''
trigger:
- platform: state
entity_id: binary_sensor.dhw_sensor
from: 'off'
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.dhw_bathroom_temperature
above: '34'
action:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
entity_id:
- switch.shellyswitch25_e8db84a1fff1_channel_1
mode: restart
- id: '1611692669248'
alias: OTGW Notify Evohome Setpoint
description: ''
trigger:
- platform: state
entity_id: sensor.otgw_evohome_setpoint
condition:
- condition: numeric_state
entity_id: sensor.otgw_evohome_setpoint
below: '70'
above: '9'
action:
- service: notify.notify
data:
message: 'Setpoint is {{ states(''sensor.otgw_evohome_setpoint'') }} at {{ states.sensor.time.state
}} '
title: Evohome setpoint change
mode: single
- id: '1611868918817'
alias: OTGW Notify Boiler Setpoint
description: ''
trigger:
- platform: state
entity_id: sensor.otgw_boiler_setpoint
condition:
- condition: numeric_state
entity_id: sensor.otgw_boiler_setpoint
below: '70'
above: '9'
action:
- service: notify.notify
data:
message: 'Setpoint is {{ states(''sensor.otgw_boiler_setpoint'') }} at {{ states.sensor.time.state
}} '
title: Boiler setpoint change
mode: single
- id: '1631215436548'
alias: String Light Auto off (Duplicate)
description: Switches off 60 mins after manual switch on (checks whether light has
been turned on by the schedule in the meantime)
trigger:
- platform: state
entity_id: switch.shelly1_a4cf12f41fd4
to: 'on'
for: 00:01:00
condition:
- condition: state
entity_id: switch.schedule_658e37
state: 'off'
action:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.shelly1_a4cf12f41fd4
mode: restart
- id: '1631216719809'
alias: Garden Light Auto off (Duplicate)
description: Switches off 60 mins after manual switch on (checks whether light has
been turned on by the schedule in the meantime)
trigger:
- platform: state
entity_id: switch.light_switch
to: 'on'
for: 00:60:00
condition:
- condition: state
entity_id: switch.schedule_e7d7f3
state: 'off'
action:
- service: switch.turn_off
data: {}
entity_id: switch.light_switch
mode: restart
- id: '1637091564419'
alias: Home assistant shutdown - OTGW reset
description: ''
trigger:
- platform: homeassistant
event: shutdown
condition: []
action:
- service: script.otgw_reset
mode: single