Skip to content

New export more solar feature#4117

Merged
springfall2008 merged 5 commits into
mainfrom
feat/opt_more_solar
Jun 24, 2026
Merged

New export more solar feature#4117
springfall2008 merged 5 commits into
mainfrom
feat/opt_more_solar

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 23, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an “export more solar” optimisation pass to Predbat’s planning engine, allowing the optimiser to convert otherwise-idle export windows into “freeze export” windows when PV is predicted, as long as the plan metric impact stays within a configurable threshold.

Changes:

  • Introduces new config entities: switch.predbat_export_more_solar and input_number.predbat_export_more_solar_threshold (expert).
  • Implements optimise_solar() in the planner and wires it into optimise_all_windows().
  • Adds a dedicated unit test suite for the new optimisation and documents the feature.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/customisation.md Documents the new “Export more solar” switch and threshold behavior.
apps/predbat/unit_test.py Registers the new optimise-solar test suite in the unit test runner.
apps/predbat/tests/test_single_debug.py Adds a commented debug toggle for the new feature.
apps/predbat/tests/test_optimise_solar.py New tests validating optimise_solar behavior (PV present/absent, threshold reject, freeze disabled, active window untouched).
apps/predbat/predbat.py Bumps version and initializes new config fields on reset.
apps/predbat/plan.py Adds optimise_solar() and invokes it late in optimise_all_windows().
apps/predbat/fetch.py Reads new config options from args into runtime settings.
apps/predbat/config.py Defines the new switch and threshold entities in CONFIG_ITEMS.

Comment thread apps/predbat/plan.py Outdated
Comment thread docs/customisation.md Outdated
springfall2008 and others added 2 commits June 24, 2026 07:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread apps/predbat/plan.py Outdated
Comment thread apps/predbat/plan.py
@springfall2008 springfall2008 merged commit 535b6f5 into main Jun 24, 2026
1 check passed
@springfall2008 springfall2008 deleted the feat/opt_more_solar branch June 24, 2026 08:05
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.

2 participants