-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
532 lines (531 loc) · 16.8 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
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
- id: '1675016443917'
alias: Attic Power Toggle
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.attic_study_power
condition: []
action:
- if:
- condition: state
entity_id: input_boolean.attic_study_power
state: 'on'
then:
- service: scene.turn_on
target:
entity_id: scene.attic_on
metadata: {}
else:
- if:
- condition: state
entity_id: input_boolean.attic_study_power
state: 'off'
then:
- service: script.graceful_shutdown
data: {}
mode: single
- id: '1677542848958'
alias: Home Energy Carbon Split
description: ''
trigger:
- platform: state
entity_id:
- sensor.home_energy
condition:
- condition: template
value_template: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%}
{{ delta > 0 }}'
action:
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_energy = states("input_number.energy_fossil_home")
| float -%} {{ current_energy + delta * 0.01 * (states("sensor.co2_signal_grid_fossil_fuel_percentage")
| float) }}'
target:
entity_id: input_number.energy_fossil_home
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_energy = states("input_number.energy_low_carbon_home")
| float -%} {{ current_energy + delta * 0.01 * (100 - (states("sensor.co2_signal_grid_fossil_fuel_percentage")
| float)) }}'
target:
entity_id: input_number.energy_low_carbon_home
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_carbon = states("input_number.carbon_footprint_home")
| float -%} {{ current_carbon + 0.001 * delta * (states("sensor.co2_signal_co2_intensity")
| float) }}'
target:
entity_id: input_number.carbon_footprint_home
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_cost = states("input_number.cost_home") | float
-%} {{ current_cost + delta * (states("sensor.octopus_energy_electricity_16p7133293_1012800425985_current_rate")
| float) }}'
target:
entity_id: input_number.cost_home
- if:
- condition: state
entity_id: binary_sensor.octopus_intelligent_slot
state: 'on'
then:
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_energy = states("input_number.home_off_peak_energy")
| float -%} {{ current_energy + delta }}'
target:
entity_id: input_number.home_off_peak_energy
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_cost = states("input_number.home_off_peak_cost")
| float -%} {{ current_cost + delta * 0.075 }}'
target:
entity_id: input_number.home_off_peak_cost
else:
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_energy = states("input_number.home_peak_energy")
| float -%} {{ current_energy + delta }}'
target:
entity_id: input_number.home_peak_energy
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_cost = states("input_number.home_peak_cost")
| float -%} {{ current_cost + delta * 0.401 }}'
target:
entity_id: input_number.home_peak_cost
mode: single
- id: '1680374296097'
alias: Home Internal Consumption Split
description: ''
trigger:
- platform: state
entity_id:
- sensor.home_internal_consumption
condition: []
action:
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_internal = states("input_number.home_internal_consumption")
| float -%} {%- if delta > 0 -%} {{ current_internal + delta }} {%- else
-%} {{ current_internal }} {%- endif -%}'
target:
entity_id: input_number.home_internal_consumption
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_carbon = states("input_number.home_shadow_carbon_footprint")
| float -%} {%- if delta > 0 -%} {{ current_carbon + 0.001 * delta * (states("sensor.co2_signal_co2_intensity")
| float) }} {%- else -%} {{ current_carbon }} {%- endif -%}'
target:
entity_id: input_number.home_shadow_carbon_footprint
- service: input_number.set_value
data:
value: '{%- set delta = trigger.to_state.state | float - trigger.from_state.state
| float -%} {%- set current_cost = states("input_number.home_shadow_cost")
| float -%} {%- if delta > 0 -%} {{ current_cost + delta * (states("sensor.octopus_energy_electricity_16p7133293_1012800425985_current_rate")
| float) }} {%- else -%} {{ current_cost }} {%- endif -%}'
target:
entity_id: input_number.home_shadow_cost
mode: single
- id: '1697985195881'
alias: Tumble Dryer power activity
description: Monitors tumble dryer status
use_blueprint:
path: leofabri/appliance-status-monitor.yaml
input:
appliance_socket: switch.tumble_dryer
appliance_power_sensor: sensor.tumble_dryer_current_power
appliance_state_machine: input_select.tumble_dryer_state_machine
appliance_job_cycle: input_boolean.tumble_dryer_job_cycle
delayed_job_completion_timer: timer.tumble_dryer_delayed_job_completion_timer
automation_self_trigger: input_boolean.tumble_dryer_automation_self_trigger
delayed_job_completion_duration: 0
appliance_finishing_power_threshold: 1
- id: '1697985676135'
alias: Air Fryer power activity
description: ''
use_blueprint:
path: leofabri/appliance-status-monitor.yaml
input:
appliance_socket: switch.misc
appliance_power_sensor: sensor.misc_current_power
appliance_state_machine: input_select.air_fryer_state_machine
appliance_job_cycle: input_boolean.air_fryer_job_cycle
delayed_job_completion_timer: timer.air_fryer_delayed_job_completion_timer
automation_self_trigger: input_boolean.air_fryer_automation_self_trigger
delayed_job_completion_duration: 60
- id: '1697985837628'
alias: Dishwasher power activity
description: ''
use_blueprint:
path: leofabri/appliance-status-monitor.yaml
input:
appliance_socket: switch.dishwasher
appliance_power_sensor: sensor.dishwasher_current_power
appliance_state_machine: input_select.dishwasher_state_machine
appliance_job_cycle: input_boolean.dishwasher_job_cycle
delayed_job_completion_timer: timer.dishwasher_delayed_job_completion_timer
automation_self_trigger: input_boolean.dishwasher_automation_self_trigger
delayed_job_completion_duration: 0
appliance_finishing_power_threshold: 1
- id: '1697985955021'
alias: Washing Machine power activity
description: ''
use_blueprint:
path: leofabri/appliance-status-monitor.yaml
input:
appliance_socket: switch.washing_machine
appliance_power_sensor: sensor.washing_machine_current_power
appliance_state_machine: input_select.washing_machine_state_machine
appliance_job_cycle: input_boolean.washing_machine_job_cycle
delayed_job_completion_timer: timer.washing_machine_delayed_job_completion_timer
automation_self_trigger: input_boolean.washing_machine_automation_self_trigger
delayed_job_completion_duration: 0
- id: '1697987944677'
alias: Cooker power activity
description: ''
use_blueprint:
path: leofabri/appliance-status-monitor.yaml
input:
appliance_socket: switch.dishwasher
appliance_power_sensor: sensor.cooker_3_1min
appliance_job_cycle: input_boolean.cooker_job_cycle
appliance_state_machine: input_select.cooker_state_machine
delayed_job_completion_timer: timer.cooker_delayed_job_completion_timer
automation_self_trigger: input_boolean.cooker_automation_self_trigger
delayed_job_completion_duration: 0
- id: '1698102982015'
alias: Sync lava lamp with sofa front lamp
description: ''
trigger:
- platform: device
type: changed_states
device_id: d05c9d2507155da9b10ad8b4141a1ed7
entity_id: 4ebcc930d5f2e6209ed303eef5e698ed
domain: light
condition: []
action:
- if:
- condition: device
type: is_off
device_id: d05c9d2507155da9b10ad8b4141a1ed7
entity_id: 4ebcc930d5f2e6209ed303eef5e698ed
domain: light
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.charging_socket
- service: switch.turn_off
target:
entity_id:
- switch.lava_lamp_red_switch
data: {}
else:
- service: switch.turn_on
data: {}
target:
entity_id: switch.charging_socket
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.lava_lamp_red_switch
mode: single
- id: '1698274812007'
alias: Reload Emporia Vue
description: If the cooker real-time power sensor goes offline, reload the Emporia
Vue configuration
trigger:
- platform: state
entity_id:
- sensor.cooker_3_1min
to: unavailable
condition: []
action:
- service: homeassistant.reload_config_entry
data: {}
target:
device_id: 7b65104762e00030c99ffba8adb37c59
mode: single
- id: '1699727729502'
alias: Mac mini status lamp
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.gareths_mac_mini_camera_in_use
from: 'off'
to: 'on'
- platform: state
entity_id:
- binary_sensor.gareths_mac_mini_camera_in_use
from: 'on'
to: 'off'
condition: []
action:
- if:
- condition: state
entity_id: binary_sensor.gareths_mac_mini_camera_in_use
state: 'on'
then:
- service: scene.turn_on
target:
entity_id: scene.mac_mini_camera_active
metadata: {}
- if:
- condition: state
entity_id: binary_sensor.gareths_mac_mini_camera_in_use
state: 'off'
then:
- service: scene.turn_on
target:
entity_id: scene.mac_mini_camera_inactive
metadata: {}
mode: single
- id: '1706798745365'
alias: Elly's Room Lights On
description: ''
trigger:
- device_id: 98635ebb80db3abbb5b1a492193a2116
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
condition: []
action:
- service: light.turn_on
metadata: {}
data:
transition: 3
target:
entity_id: light.ellys_room
mode: single
- id: '1706798801938'
alias: Elly's Room Lights turn off
description: ''
trigger:
- device_id: 98635ebb80db3abbb5b1a492193a2116
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
condition: []
action:
- service: light.turn_off
target:
entity_id:
- light.ellys_room
data:
transition: 5
mode: single
- id: '1707769007250'
alias: Fridge area turn on
description: ''
trigger:
- device_id: 02664aeffc6b1a302c42648fe03380a4
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
condition: []
action:
- service: light.turn_on
metadata: {}
data: {}
target:
entity_id:
- light.fridge_area
mode: single
- id: '1707769081723'
alias: Fridge area turn off
description: ''
trigger:
- device_id: 02664aeffc6b1a302c42648fe03380a4
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
condition: []
action:
- service: light.turn_off
data: {}
target:
entity_id:
- light.fridge_area
mode: single
- id: '1708104096785'
alias: Top Floor Landing motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.top_floor_landing_motion_sensor_motion
light_switch:
entity_id:
- light.top_floor_landing_2
- light.top_floor_landing
time_delay: 1
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.top_floor_landing_2
night_time_delay: 1
night_light_brightness: 1
night_lights_conditions:
- time_enabled
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:30:00
include_sun: sun_enabled
light_transition_off: 5
light_transition_on: 1
include_light_control:
- use_brightness
- use_transition
include_night_light_control:
- use_brightness
- use_transition
night_light_transition_off: 6
night_light_transition_on: 2
- id: '1708105351754'
alias: Shower Room motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.shower_room_motion_sensor_motion
light_switch:
entity_id: light.shower_room
time_delay: 7
include_sun: sun_enabled
include_night_lights: night_lights_enabled
include_night_light_control:
- use_brightness
- use_transition
night_light_brightness: 1
night_light_transition_off: 5
night_lights_conditions:
- time_enabled
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:00:00
include_light_control:
- use_brightness
- use_transition
light_transition_off: 5
- id: '1708110582530'
alias: Landing motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.landing_motion_sensor_motion
light_switch:
entity_id: light.landing
time_delay: 1
include_sun: sun_enabled
include_night_lights: night_lights_enabled
include_night_light_control:
- use_brightness
- use_transition
night_light_brightness: 1
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:00:00
night_time_delay: 1.5
night_lights:
entity_id: light.landing
night_lights_conditions:
- time_enabled
include_light_control:
- use_brightness
- use_transition
light_transition_off: 5
night_light_transition_off: 5
- id: '1708110726415'
alias: Bathroom motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.bathroom_motion_sensor_motion
light_switch:
entity_id: light.bathroom
include_sun: sun_enabled
include_night_lights: night_lights_disabled
include_night_light_control: []
night_light_brightness: 1
night_lights_conditions:
- sun_enabled
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:00:00
include_time: time_enabled
after_time: 07:00:00
before_time: '22:00:00'
include_light_control:
- use_brightness
- use_transition
- id: '1708110930234'
alias: Hall motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.hall_motion_sensor_motion
light_switch:
entity_id: light.hall
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.hall
include_night_light_control:
- use_brightness
night_light_brightness: 1
night_lights_conditions:
- time_enabled
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:00:00
include_sun: sun_enabled
include_light_control:
- use_brightness
- use_transition
- id: '1708113067127'
alias: Downstairs Toilet motion
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.downstairs_toilet_motion_sensor_motion
light_switch:
entity_id: light.downstairs_toilet
time_delay: 3
night_lights:
entity_id: light.downstairs_toilet
include_night_light_control:
- use_brightness
- use_transition
night_lights_after_time: '22:30:00'
night_lights_before_time: 07:00:00
include_night_lights: night_lights_disabled
night_light_brightness: 1
night_lights_conditions:
- time_enabled
include_light_control:
- use_brightness
- use_transition
light_transition_off: 6
night_light_transition_off: 5