Merged
Conversation
Contributor
LKuemmel
commented
Mar 18, 2026
- einphasig: Sollstrom 20A -> 14
- dreiphasig: Sollstrom 16A-> 14A
- dreiphasig: verkonfiguriert, Sollstrom 18A
- einphasig: verkonfiguriert, Sollstrom 25A
Contributor
There was a problem hiding this comment.
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
currentvalue instead offormatted_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) |
ndrsnhs
pushed a commit
to ndrsnhs/core
that referenced
this pull request
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.