Files
goodwe-addon/goodwe_controller/DECISIONS/OPT-11-battery-modes.md
T
Claude dev agent d69fd8fbfd
checks / unit (pull_request) Successful in 10m59s
infra-pin / fresh (pull_request) Successful in 1s
OPT-11 P1: per-battery mode limits, on/off, solar order
A battery's mode is a soft unit limit (source `mode`, P_MODE 35) kept
apart from the hard limits in pre_resolve(). The allocator applies it
only while the site target is decided at or below 35 (new
Resolution.deciding_priority), so the peak floor releases it and a mode
`hi` never meets the site `lo`. At N=1 resolve() applies the same rule
to the site target after stage 2. A mode range without 0 W is dropped
as a software fault, so REFUSE_SIGN stays unreachable from a mode.

compute() gets the loop bound (sum over live units of hard limits with
modes applied), so the loop never asks for watts no battery may give
and the saturation freeze never parks on them. While charging, Leftover
solar weighs 0 so Solar first fills first. Store keys pack_use and
pack_mode per battery, set by two new /action values; Off stops and
skips maintenance with a log line. Minimal Batteries cards (EN/NL).

Off by default (battery_modes_enabled); off, commands are byte-identical
to a5dddad at N=1 and N=2 (test_modes.py part 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:51:29 +02:00

845 B

OPT-11 - battery modes, per battery

A battery's mode (on/off, Solar first, Leftover solar) is a soft unit limit at P_MODE = 35 that always holds 0 W, applies only while the site target is decided at or below 35, and is released by anything above it, such as the peak guard. Design and owner answers: goodwe-session/OPT-11-design.md (2026-09-27); P1 is its section 6 P1, and the pull request lists what was measured.

  • Off by default (battery_modes_enabled); off, commands are byte-identical to a5dddad (test_modes.py part 1).
  • Off is a mode range, so the peak guard can still use an Off battery (design sections 2-3). Whether Off should be absolute is an open owner question.
  • In P1 only Off closes a direction; Leftover solar differs by charging last. Price runs, selling (pack_sell, reserved) and the forecast are P3/P4.