Skip to content

Allow max current above 32 A and clamp to the entity range (#67) - #78

Open
MonsterD1 wants to merge 1 commit into
InventoCasa:mainfrom
MonsterD1:fix/67-max-current-above-32a
Open

MonsterD1 wants to merge 1 commit into
InventoCasa:mainfrom
MonsterD1:fix/67-max-current-above-32a

Conversation

@MonsterD1

Copy link
Copy Markdown

Problem

The Max Current field of dynamic-current appliances was capped at 32 A (MAX_CURRENT), so chargers that support 40 A or more (e.g. a Tesla Wall Connector at 40 A / 240 V) could not use their full range.

Change

  • MAX_CURRENT (the field limit only) raised to 80 A.
  • Every current setpoint is clamped to the number entity's own min/max attributes before writing (same approach already used for the battery discharge and max-charge entities). The optimizer therefore never commands more than the user's Max Current or the entity's native max, and a wider configuration cannot cause a rejected set_value call. The clamped value is also used for the confirmation check, so it is not rewritten every cycle.
  • README (EN/DE) and the appliance configuration doc updated.

Validation

  • New regressions in tests/test_block3_coordinator.py: clamp to entity max (and no rewrite once confirmed), 40 A allowed when the entity permits it, Max Current field accepts 40 A.
  • Full suite on HA 2025.8 / Python 3.13: 1292 passed. scripts/check_public_tree.py: 0 findings.

Closes #67

…sa#67)

The Max Current field was capped at 32 A, so chargers supporting 40 A
or more could not use their full range. The field now accepts up to
80 A, and every current setpoint is clamped to the number entity's own
min/max attributes so a wider configuration never causes a rejected
service call.
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.

Allow dynamic charging current above 32A / respect current entity native max

1 participant