feat: Add inverter_limit_export to cap discharge rate during forced export only#3875
Draft
feat: Add inverter_limit_export to cap discharge rate during forced export only#3875
Conversation
… export Agent-Logs-Url: https://github.com/springfall2008/batpred/sessions/0d18f601-6845-4146-97d7-c026fc93c39d Co-authored-by: springfall2008 <48591903+springfall2008@users.noreply.github.com>
Agent-Logs-Url: https://github.com/springfall2008/batpred/sessions/0d18f601-6845-4146-97d7-c026fc93c39d Co-authored-by: springfall2008 <48591903+springfall2008@users.noreply.github.com>
Agent-Logs-Url: https://github.com/springfall2008/batpred/sessions/0d18f601-6845-4146-97d7-c026fc93c39d Co-authored-by: springfall2008 <48591903+springfall2008@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add ability to scale down max export rate during forced export
feat: Add inverter_limit_export to cap discharge rate during forced export only
May 6, 2026
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.
inverter_limit_dischargecaps discharge globally, including ECO mode. This addsinverter_limit_exportto cap discharge rate exclusively during forced export windows while leaving ECO mode discharge unaffected.New config option
Defaults to
inverter_limit_discharge(or inverter maximum) if not set.Changes
config.py: Newinverter_limit_exportschema entry (per-inverter sensor list, integer, Watts)inverter.py: Readsinverter_limit_export, stores asbattery_rate_max_export(defaults toinverter_limit_discharge)execute.py: Accumulatesbattery_rate_max_exportacross inverters; uses it (instead ofbattery_rate_max_discharge) when callingadjust_discharge_rateduring forced exportprediction.py: Usesbattery_rate_max_exportas the discharge rate setting during export windows so the plan model matches actual behaviour; ECO-mode discharge continues to usebattery_rate_max_dischargepredbat.py: Initialisesbattery_rate_max_export = 0inreset()test_infra.pyandtest_execute.pyto propagate the new field; addeddischarge_limit_exportexecute test asserting the rate is capped to the export limit rather than the full discharge limitdocs/apps-yaml.md: Documents the new optionWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.octopus.energy/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick(dns block)/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick bin/rustc(dns block)/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick git conf�� unset --global p/bin/git credential.helperustc(dns block)gitlab.com/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED owner --uid-owner 0 -j ACCEPT(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED conntrack --ctstate INVALID,NEW -j DROP(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED(dns block)https://api.github.com/repos/springfall2008/batpred/contents/apps/predbat/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick(http block)/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick bin/rustc(http block)/home/REDACTED/work/batpred/batpred/coverage/venv/bin/python3 python3 ../apps/predbat/unit_test.py --quick ps conf�� e-commit-hooks --global ndor/bin/bash HooksPath(http block)If you need me to access, download, or install something from one of these locations, you can either: