-
Notifications
You must be signed in to change notification settings - Fork 8
/
eco7-automations.yaml
143 lines (137 loc) · 4.62 KB
/
eco7-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
automations:
- id: "1669414355762"
alias: Sync Solis Mode to Eco7 Mode
description: If the Eco7 toggle changes, the inverter 'Grid Charging' and 'Timed Charging' toggles are set to match it.
trigger:
- platform: state
entity_id:
- input_boolean.solis_eco7_charging
condition: []
action:
- service: input_boolean.turn_{{ trigger.to_state.state }}
entity_id: input_boolean.solis_storage_mode_grid_charge
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: input_boolean.turn_{{ trigger.to_state.state }}
entity_id: input_boolean.solis_storage_mode_timed
mode: single
#
#
- id: "1669139628337"
alias: Set Eco7 Charge Current
description: Sets the Eco7 Charge Current at the start of the Eco7 period every 30 minutes during the Eco7 Period provided the Eco7 input_boolean is on
trigger:
- platform: time_pattern
minutes: "0"
- platform: time_pattern
minutes: "30"
- platform: time
at: input_datetime.economy_7_start
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.solis_eco7_charging
state: "on"
- condition: time
before: input_datetime.economy_7_end
after: input_datetime.economy_7_start
enabled: false
- condition: template
value_template:
"{{(now() >= today_at(states('input_datetime.economy_7_start')))
and (now() < today_at(states('input_datetime.economy_7_end')))
and states('input_boolean.solis_eco7_charging') == 'on'}}"
action:
- service: script.solis_set_charge_current
data:
charge_current: "{{states('sensor.solis_eco7_charge_current') | float}}"
mode: single
- id: "1669145089862"
alias: Solis Set Eco7 Charge Times
description: "Changes the Fixed Charging times on the inverter whenever the Economy 7 input_datetime entities change"
trigger:
- platform: state
entity_id:
- input_datetime.economy_7_start
- input_datetime.economy_7_end
condition:
- condition: template
value_template:
"{{strptime(states('input_datetime.economy_7_end'),'%H:%M:%S').time()
>strptime(states('input_datetime.economy_7_start'),'%H:%M:%S').time()}}"
action:
- service: script.solis_set_eco7_times
data: {}
mode: single
- id: '1678731184170'
alias: Set Target SOC for Overnight Charging
description: ''
trigger:
- platform: time
at: 00:28:00
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: input_number.set_value
entity_id: input_number.eco7_target_soc
data:
value: '{{ states(''sensor.target_battery_charge_weekday'') | int(0) }}'
mode: single
- id: '1678731184171'
alias: Set Flux Discharge Current
description: >-
Sets the Flux Discharge Current at the start of the Flux period every 5
minutes during the Flux Period provided the Flux input_boolean is on
trigger:
- platform: time_pattern
minutes: "0"
- platform: time_pattern
minutes: /5
- platform: time
at: input_datetime.flux_discharge_start
condition:
- condition: template
value_template: >-
{{(now() >= today_at(states('input_datetime.flux_discharge_start'))) and
(now() < today_at(states('input_datetime.flux_discharge_end'))) and
states('input_boolean.solis_flux_discharging') == 'on'}}
action:
- service: script.solis_set_discharge_current
data:
discharge_current: "{{states('sensor.solis_flux_discharge_current_template') | float}}"
mode: restart
- id: '1678731184172'
alias: " Solis Set Flux Discharge Times "
description: >-
Changes the Fixed Discharging times on the inverter whenever the Flux
input_datetime entities change
trigger:
- platform: time_pattern
minutes: /5
- platform: state
entity_id:
- input_boolean.solis_flux_discharging
condition:
- condition: template
value_template: >-
{{strptime(states('input_datetime.flux_discharge_end'),'%H:%M:%S').time()
>strptime(states('input_datetime.flux_discharge_start'),'%H:%M:%S').time()}}
action:
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: script.solis_set_flux_times
data: {}
mode: single