Conversation
The API accepts ChargerMinCurrent = 0, but the Zaptec portal then rejects any later settings change for that charger, see custom-components#289. Raise the entity's minimum to the IEC 61851 floor of 6A, and reject setting charger_max_current below charger_min_current and vice versa. available_current and three_to_one_phase_switch_current keep a 0 minimum. 0 is not a charging current for either: it forces 3-phase charging on the latter, and is a regularly used way to hold the charger off on the former. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The Zaptec API accepts
ChargerMinCurrent = 0, but the portal then rejects anylater settings change for that charger (#289). This raises the entity minimum to
the IEC 61851 floor of 6A, and rejects setting
charger_max_currentbelowcharger_min_currentand vice versa.AvailableCurrentandThreeToOnePhaseSwitchCurrentkeep a 0 minimum, contraryto the blanket ">= 6A" advice in the issue thread. 0 is not a charging current
for either: it forces 3-phase charging on the latter (per Zaptec's own docs, as
raised in the thread), and is a regularly used way to hold the charger off on the
former — flooring it would break existing automations that stop charging that way.
Behavior change worth noting: a charger currently reporting a minimum below 6A
will show that value as out of range until it is raised, and
number.set_valuecalls below 6A now fail.
Tests cover the declared minimums only. The max/min check needs entity-level
tests, and I'd rather write those against the harness from #414 than hand-rolled
mocks — happy to add a commit with them once #414 has merged, if you'd like.