-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmart-charging.yaml
More file actions
76 lines (72 loc) · 2 KB
/
Copy pathsmart-charging.yaml
File metadata and controls
76 lines (72 loc) · 2 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
blueprint:
name: Ypsilon - Smart Charging
description: >
Automatically turns the socket on and off for charging.
source_url: https://github.com/YpsilonTM/homeassistant-blueprints/blob/master/smart-charging.yaml
domain: automation
input:
charge_socket:
name: Charging Socket/Switch
description: "The socket where your charger is plugged in"
selector:
entity:
domain:
- switch
multiple: false
battery_level:
name: Battery Level
description: "Battery level sensor from the Home Assistant companion app on your phone"
selector:
entity:
domain:
- sensor
multiple: false
min_battery_level:
name: Minimum Battery Level
description: "Minimum battery level at which charging turns on"
default: 20
selector:
number:
min: 0.0
max: 40.0
step: 1.0
mode: slider
unit_of_measurement: "%"
max_battery_level:
name: Maximum Battery Level
description: "Maximum battery level after which scheduled charging won’t turn on"
default: 80
selector:
number:
min: 60.0
max: 100.0
step: 1.0
mode: slider
unit_of_measurement: "%"
trigger:
- trigger: state
entity_id: !input battery_level
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input battery_level
above: !input max_battery_level
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: !input charge_socket
- conditions:
- condition: numeric_state
entity_id: !input battery_level
below: !input min_battery_level
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: !input charge_socket
mode: single