Repository navigation
FoxESS Avocado: add battery force discharge mode - #33977
Merged
Merged
Conversation
premultiply
self-requested a review
September 24, 2026 04:32
premultiply
marked this pull request as ready for review
September 24, 2026 04:37
premultiply
enabled auto-merge (squash)
September 24, 2026 04:38
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the Modbus values are wrong, the new mode can command the battery to discharge at the configured power, consuming stored energy before the command times out. Reverting prevents future force-discharge commands, but it cannot restore energy already discharged; the impact is bounded and recoverable by recharging.
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.
fixes #33976
Adds a
case: 5(force discharge) branch to thebatterymodewatchdog/switch intemplates/definition/meter/fox-ess-avocado.yaml, mirroring the existingcase: 3(force charge) pattern:46001(Remote Control Mode) =5(target:battery, generation system disabled, enabled), per the official Solakon ONE Modbus protocol.46002(Remote Timeout Set) =60, same as the other cases.46003(Remote Active Power) =.maxdischargepower.maxdischargepowerparam override (default: 800,required: true), since thebattery-paramspreset leaves it optional with no default, and it's now referenced by the template.case: 5matchesapi.BatteryDischargein the Go enum and the existingzendure-solarflow-battery.yamltemplate, which uses the same convention.Not yet tested on real hardware — this was proposed as-is by the issue reporter, derived from the official protocol document and the existing
case: 2pattern. Opening as draft for review/testing before merge, as requested in the issue.🤖 Generated with Claude Code