-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpower_toggler.yaml
77 lines (75 loc) · 2.23 KB
/
power_toggler.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
blueprint:
name: Power Toggler
description: This blueprint is used to toggle devices based on power usage.
domain: automation
input:
power:
name: Trigger device
description: Select which devices to trigger power usage from.
selector:
device:
delay_on:
name: Delay timer on
description: How long to delay the automation after Wattage change.
default: "00:00:00"
selector:
time:
turn_on:
name: Power on
description: When to turn on devices.
default: 7500
selector:
number:
unit_of_measurement: "W"
step: 500
min: 5000
max: 15000
action_on:
name: Target action when on
description: If you want to enable conditions before runtime, add a condition in the front of the actions.
selector:
action:
delay_off:
name: Delay timer off
description: How long to delay the automation after Wattage change.
default: "00:00:00"
selector:
time:
turn_off:
name: Power off
description: When to turn off devices.
default: 8000
selector:
number:
unit_of_measurement: "W"
step: 500
min: 5000
max: 15000
action_off:
name: Target action when off
description: If you want to enable conditions before runtime, add a condition in the front of the actions.
selector:
action:
trigger:
- platform: device
id: trigger_on
device_id: !input power
domain: sensor
below: !input turn_on
for: !input delay_on
- platform: device
id: trigger_off
device_id: !input power
domain: sensor
above: !input turn_off
for: !input delay_off
action:
- choose:
- conditions:
- condition: trigger
id: trigger_on
sequence: !input action_on
- conditions:
- condition: trigger
id: trigger_off
sequence: !input action_off