Skip to content

Avoid freeze export during car charging sessions if export more solar is on#4134

Merged
springfall2008 merged 1 commit into
mainfrom
fix/car_slow_battery
Jun 26, 2026
Merged

Avoid freeze export during car charging sessions if export more solar is on#4134
springfall2008 merged 1 commit into
mainfrom
fix/car_slow_battery

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 26, 2026 18:37

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

This PR fixes an interaction between the “export more solar” optimisation pass and EV charging: it prevents the optimiser from converting an idle export window into a freeze export window when that window overlaps a scheduled car charging slot (unless the configuration allows the car to charge from the battery).

Changes:

  • Update optimise_solar() to skip enabling freeze export (export limit 99.0) on idle export windows that intersect a car charging slot when car_charging_from_battery is disabled.
  • Extend the optimise-solar test harness to configure car charging slots and the car_charging_from_battery flag.
  • Add targeted tests verifying overlap handling (blocked vs allowed when charging-from-battery is enabled).

Reviewed changes

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

File Description
apps/predbat/plan.py Prevents “export more solar” from enabling freeze export over EV charging slots unless EV charging-from-battery is enabled.
apps/predbat/tests/test_optimise_solar.py Adds EV overlap scenarios to validate the new optimiser behaviour and the charging-from-battery exception.

@springfall2008 springfall2008 changed the title Car charging from solar fix Avoid freeze export during car charging sessions if export more solar is on Jun 26, 2026
@springfall2008 springfall2008 merged commit 610284d into main Jun 26, 2026
2 checks passed
@springfall2008 springfall2008 deleted the fix/car_slow_battery branch June 26, 2026 18:42
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