@@ -308,8 +308,7 @@ def scheduled_charging_recent_plan(self,
308308 phase_switch_supported : bool ,
309309 charging_type : str ,
310310 chargemode_switch_timestamp : float ,
311- control_parameter : ControlParameter ,
312- soc_request_interval_offset : int ) -> Optional [SelectedPlan ]:
311+ control_parameter : ControlParameter ) -> Optional [SelectedPlan ]:
313312 plans_diff_end_date = []
314313 for p in self .data .chargemode .scheduled_charging .plans :
315314 if p .active :
@@ -342,7 +341,7 @@ def scheduled_charging_recent_plan(self,
342341
343342 remaining_time , missing_amount , phases , duration = self ._calc_remaining_time (
344343 plan , plan_end_time , soc , ev_template , used_amount , max_hw_phases , phase_switch_supported ,
345- charging_type , control_parameter .phases , soc_request_interval_offset )
344+ charging_type , control_parameter .phases )
346345
347346 return SelectedPlan (remaining_time = remaining_time ,
348347 duration = duration ,
@@ -361,8 +360,7 @@ def _calc_remaining_time(self,
361360 max_hw_phases : int ,
362361 phase_switch_supported : bool ,
363362 charging_type : str ,
364- control_parameter_phases : int ,
365- soc_request_interval_offset : int ) -> SelectedPlan :
363+ control_parameter_phases ) -> SelectedPlan :
366364 if plan .phases_to_use == 0 :
367365 if max_hw_phases == 1 :
368366 duration , missing_amount = self ._calculate_duration (
@@ -382,9 +380,7 @@ def _calc_remaining_time(self,
382380 duration_1p , missing_amount = self ._calculate_duration (
383381 plan , soc , ev_template .data .battery_capacity , used_amount , 1 , charging_type , ev_template )
384382 remaining_time_1p = plan_end_time - duration_1p
385- # Kurz vor dem nächsten Abfragen des SoC, wenn noch der alte SoC da ist, kann es sein, dass die Zeit
386- # für 1p nicht mehr reicht, weil die Regelung den neuen SoC noch nicht kennt.
387- if remaining_time_1p - (soc_request_interval_offset if plan .limit .selected == "soc" else 0 ) < 0 :
383+ if remaining_time_1p < 0 :
388384 # Zeit reicht nicht mehr für einphasiges Laden
389385 remaining_time = remaining_time_3p
390386 duration = duration_3p
@@ -470,8 +466,6 @@ def scheduled_charging_calc_current(self,
470466 else :
471467 plan_current = plan .dc_current
472468 max_current = ev_template .data .dc_max_current
473- if plan .limit .selected != "soc" :
474- soc_request_interval_offset = 0
475469 log .debug ("Verwendeter Plan: " + str (plan .name ))
476470 if limit .selected == "soc" and soc >= limit .soc_limit and soc >= limit .soc_scheduled :
477471 message = self .SCHEDULED_CHARGING_REACHED_LIMIT_SOC
0 commit comments