Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix different phases at the end of charging #2168

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions packages/control/chargepoint/chargepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,10 @@ def get_phases_by_selected_chargemode(self) -> int:
# Wenn keine Umschaltung verbaut ist, die Phasenzahl nehmen, mit der geladen wird. Damit werden zB auch
# einphasige EV an dreiphasigen openWBs korrekt berücksichtigt.
phases = self.data.get.phases_in_use or self.data.set.phases_to_use
elif (chargemode == 0 and (self.data.set.phases_to_use == self.data.get.phases_in_use or
self.data.get.phases_in_use == 0)):
elif self.data.control_parameter.state == ChargepointState.PERFORMING_PHASE_SWITCH:
phases = self.data.set.phases_to_use
log.debug(f"Umschaltung wird durchgeführt, Phasenzahl nicht ändern {phases}")
elif chargemode == 0:
# Wenn die Lademodus-Phasen 0 sind, wird die bisher genutzte Phasenzahl weiter genutzt,
# bis der Algorithmus eine Umschaltung vorgibt, zB weil der gewählte Lademodus eine
# andere Phasenzahl benötigt oder bei PV-Laden die automatische Umschaltung aktiv ist.
Expand All @@ -537,9 +539,6 @@ def get_phases_by_selected_chargemode(self) -> int:
# phases_target
phases = self.data.config.connected_phases
log.debug(f"Phasenzahl Lademodus: {phases}")
elif self.data.control_parameter.state == ChargepointState.PERFORMING_PHASE_SWITCH:
phases = self.data.set.phases_to_use
log.debug(f"Umschaltung wird durchgeführt, Phasenzahl nicht ändern {phases}")
else:
if chargemode == 0:
phases = self.data.control_parameter.phases
Expand Down