Skip to content

Enforce a 6A minimum on charger_min_current - #429

Open
rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:fix/issue-289-min-current
Open

rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:fix/issue-289-min-current

Conversation

@rhammen

@rhammen rhammen commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The Zaptec API accepts ChargerMinCurrent = 0, but the portal then rejects any
later settings change for that charger (#289). This raises the entity minimum to
the IEC 61851 floor of 6A, and rejects setting charger_max_current below
charger_min_current and vice versa.

AvailableCurrent and ThreeToOnePhaseSwitchCurrent keep a 0 minimum, contrary
to 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_value
calls 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.

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>
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.

1 participant