Skip to content

Conversation

@iseeberg79
Copy link
Contributor

@iseeberg79 iseeberg79 commented Jan 18, 2026

Based on discussions #26709 and probably #25773,

A change from battery mode "charge" to "hold" actually has written to charge power into Register 1034 and starts writing the value 0 in register 1040 which means continued charging and avoidance of discharging.

Same might occur for an edge-case directly after switching to normal: batteryMode normal has written 0 to 1034. Going into hold within 60s is starting to write 0 to register 1040. Because 1034 and 1040 are set the inverter is not able to charge surplus into the battery, discharging is avoided.

This is because we had no reset to internal mode between battery mode transition and the written values remain while being externally controlled. The use of two registers leads into unexpected behavior.

The change restores the limitation where surplus charging is not possible during hold as a required and unwanted limitation.

@evcc-bot evcc-bot added bug Something isn't working devices Specific device support labels Jan 18, 2026
@iseeberg79 iseeberg79 marked this pull request as ready for review January 18, 2026 13:57
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Given that the revert hinges on subtle behavior differences between registers 1034 and 1040, consider adding a brief inline comment near the setpoint register to clarify why 1034 must be used in hold mode to avoid the unintended charging behavior you describe in the PR.
  • The user-facing descriptions now mention a "locked" state and limitations; it may be worth aligning the terminology explicitly with the inverter's actual mode names (e.g., "hold" vs. "locked") to prevent confusion when users compare the template behavior with the device UI or manual.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Given that the revert hinges on subtle behavior differences between registers 1034 and 1040, consider adding a brief inline comment near the setpoint register to clarify why 1034 must be used in `hold` mode to avoid the unintended charging behavior you describe in the PR.
- The user-facing descriptions now mention a "locked" state and limitations; it may be worth aligning the terminology explicitly with the inverter's actual mode names (e.g., "hold" vs. "locked") to prevent confusion when users compare the template behavior with the device UI or manual.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@iseeberg79
Copy link
Contributor Author

waiting for decision on #26790

@andig
Copy link
Member

andig commented Jan 22, 2026

@iseeberg79 would delayed transition replace this? Then let's close here and see if we can get that in.

@iseeberg79
Copy link
Contributor Author

yes, it's supposed to intentionally

@iseeberg79 iseeberg79 closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants