File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ def start(self) -> None:
63
63
first_iteration = False
64
64
else :
65
65
self ._do_iteration ()
66
+ self .iteration_cache = {}
66
67
67
68
if self .next_price_minimum .has_to_be_rechecked :
68
69
now = TimeHandler .get_time (sanitize_seconds = True )
@@ -124,6 +125,13 @@ def _do_iteration(self) -> None:
124
125
current_state_of_charge = self .inverter .get_state_of_charge ()
125
126
self .log .info (f"The battery is currently is at { current_state_of_charge } " )
126
127
128
+ if current_state_of_charge >= self .target_max_soc :
129
+ self .log .info (
130
+ f"The current state of charge ({ current_state_of_charge } ) is greater than the maximum allowed"
131
+ f"state of charge ({ self .target_max_soc } ) --> No charging necessary/possible"
132
+ )
133
+ return
134
+
127
135
self .average_power_consumption = self ._get_average_power_consumption ()
128
136
self .log .info (f"The average power consumption is { self .average_power_consumption } " )
129
137
@@ -165,8 +173,6 @@ def _do_iteration(self) -> None:
165
173
minimum_of_soc_until_next_price_minimum ,
166
174
)
167
175
168
- self .iteration_cache = {}
169
-
170
176
def coordinate_charging (
171
177
self ,
172
178
current_state_of_charge : StateOfCharge ,
You can’t perform that action at this time.
0 commit comments