diff --git a/packages/control/chargepoint/chargepoint.py b/packages/control/chargepoint/chargepoint.py index ce9d84aef..ba12a10b2 100644 --- a/packages/control/chargepoint/chargepoint.py +++ b/packages/control/chargepoint/chargepoint.py @@ -676,7 +676,7 @@ def update(self, ev_list: Dict[str, Ev]) -> None: self.set_timestamp_charge_start() self.check_phase_switch_completed() - if charging_ev.chargemode_changed: + if charging_ev.chargemode_changed or charging_ev.submode_changed: data.data.counter_all_data.get_evu_counter().reset_switch_on_off( self, charging_ev) charging_ev.reset_phase_switch(self.data.control_parameter) diff --git a/packages/control/counter.py b/packages/control/counter.py index 6a5079c55..83b2f30fe 100644 --- a/packages/control/counter.py +++ b/packages/control/counter.py @@ -492,6 +492,7 @@ def reset_switch_on_off(self, chargepoint: Chargepoint, charging_ev: Ev): else: evu_counter.data.set.released_surplus -= (pv_config.switch_on_threshold * chargepoint.data.control_parameter.phases) + chargepoint.data.control_parameter.state = ChargepointState.NO_CHARGING_ALLOWED except Exception: log.exception("Fehler im allgemeinen PV-Modul") diff --git a/packages/control/ev.py b/packages/control/ev.py index 32c54e074..811a58e74 100644 --- a/packages/control/ev.py +++ b/packages/control/ev.py @@ -573,6 +573,7 @@ def reset_phase_switch(self, control_parameter: ControlParameter): log.debug( "Zurücksetzen der reservierten Leistung für die Phasenumschaltung. reservierte Leistung: " + str(data.data.counter_all_data.get_evu_counter().data.set.reserved_surplus)) + control_parameter.state = ChargepointState.CHARGING_ALLOWED def load_default_profile(self): """ prüft, ob nach dem Abstecken das Standardprofil geladen werden soll und lädt dieses ggf..