Skip to content

Commit 806aad2

Browse files
authored
eco: use 3 phases for cheap tariff hours (#2448)
1 parent e776ba3 commit 806aad2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/control/ev/charge_template.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ def eco_charging(self,
271271
soc: Optional[float],
272272
control_parameter: ControlParameter,
273273
charging_type: str,
274-
used_amount: float) -> Tuple[int, str, Optional[str], int]:
274+
used_amount: float,
275+
max_phases_hw: int) -> Tuple[int, str, Optional[str], int]:
275276
""" prüft, ob Min-oder Max-Soc erreicht wurden und setzt entsprechend den Ladestrom.
276277
"""
277278
message = None
@@ -294,6 +295,7 @@ def eco_charging(self,
294295
if data.data.optional_data.et_charging_allowed(eco_charging.max_price):
295296
sub_mode = "instant_charging"
296297
message = self.CHARGING_PRICE_LOW
298+
phases = max_phases_hw
297299
else:
298300
current = control_parameter.min_current
299301
message = self.CHARGING_PRICE_EXCEEDED

packages/control/ev/ev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def get_required_current(self,
206206
self.data.get.soc, control_parameter.min_current, charging_type, imported_since_plugged)
207207
elif charge_template.data.chargemode.selected == "eco_charging":
208208
required_current, submode, tmp_message, phases = charge_template.eco_charging(
209-
self.data.get.soc, control_parameter, charging_type, imported_since_plugged)
209+
self.data.get.soc, control_parameter, charging_type, imported_since_plugged, max_phases_hw)
210210
else:
211211
tmp_message = None
212212
message = f"{message or ''} {tmp_message or ''}".strip()

0 commit comments

Comments
 (0)