Skip to content

fix se#3217

Merged
LKuemmel merged 1 commit intomasterfrom
feature_fix_se
Mar 18, 2026
Merged

fix se#3217
LKuemmel merged 1 commit intomasterfrom
feature_fix_se

Conversation

@LKuemmel
Copy link
Contributor

  • einphasig: Sollstrom 20A -> 14
  • dreiphasig: Sollstrom 16A-> 14A
  • dreiphasig: verkonfiguriert, Sollstrom 18A
  • einphasig: verkonfiguriert, Sollstrom 25A

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts EVSE current setting logic in Evse.set_current to apply the 20A/3‑phase current cap before formatting (0.01A vs 1A register units), avoiding incorrect comparisons when precise-current mode is enabled.

Changes:

  • Move current formatting (formatted_current) to after the 20A EVSE limiting logic.
  • Apply the 16A clamp based on the unformatted current value instead of formatted_current.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@@ -111,11 +111,11 @@ def deactivate_precise_current(self) -> None:

def set_current(self, current: int, phases_in_use: Optional[int] = None) -> None:
Comment on lines 114 to +119
if self.max_current == 20 and phases_in_use is not None and phases_in_use != 0:
# Bei 20A EVSE und bekannter Phasenzahl auf 16A begrenzen, sonst erstmal Ladung mit Minimalstrom starten,
# um Phasenzahl zu ermitteln
if formatted_current > 16 and phases_in_use > 1:
formatted_current = 16
if current > 16 and phases_in_use > 1:
current = 16
formatted_current = round(current*100) if self._precise_current else round(current)
@LKuemmel LKuemmel merged commit d2b4050 into master Mar 18, 2026
5 checks passed
ndrsnhs pushed a commit to ndrsnhs/core that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants