Skip to content

Fix GECloud ECO mode being turned off before export slot starts#3631

Merged
springfall2008 merged 3 commits intomainfrom
fix11
Mar 23, 2026
Merged

Fix GECloud ECO mode being turned off before export slot starts#3631
springfall2008 merged 3 commits intomainfrom
fix11

Conversation

@springfall2008
Copy link
Owner

Summary

Fixes #3630

Root Cause

For GEC (GivEnergy Cloud) inverters (inv_has_ge_eco_toggle=True), the pre-window scheduling path in execute_plan() was calling:

inverter.adjust_force_export(inverter.inv_has_discharge_enable_time, ...)

Since GEC has has_discharge_enable_time=True, this passed force_export=True, which immediately called adjust_inverter_mode(True) inside adjust_force_export — turning off the ECO mode toggle switch up to set_window_minutes (default 30 min) before the export window actually started.

Because the ECO toggle is an immediate HA switch (not time-gated like a register), the inverter stopped supplying battery demand load prematurely.

Fix

In the pre-window path, detect GE inverters that use an immediate mode control and pass force_export=False so ECO mode is preserved. The discharge window start/end times are still written to the registers as before.

ge_inverters = inverter.inv_has_ge_eco_toggle or inverter.inv_has_ge_inverter_mode
inverter.adjust_force_export(inverter.inv_has_discharge_enable_time and not ge_inverters, discharge_start_time, discharge_end_time)

Tests

Two new test cases in test_execute.py:

  • discharge_upcoming_ge_eco_prewindow — GEC inverter with export starting in 30 min stays in Demand status (force_export=False), ECO mode on
  • discharge_upcoming_std_prewindow — standard inverter behaviour unchanged, discharge window pre-programmed (force_export=True)

For GEC (GivEnergy Cloud) inverters that use an immediate ECO toggle switch
(inv_has_ge_eco_toggle=True), the pre-window scheduling path was passing
force_export=True to adjust_force_export, which immediately called
adjust_inverter_mode(True) and turned off the ECO switch up to set_window_minutes
(default 30 min) before the export window actually started.

Fix: when the inverter uses an immediate GE ECO toggle or GE inverter mode, pass
force_export=False for the pre-window call so ECO mode is preserved during demand
periods. The discharge window start/end times are still written to the registers.

Also fix typo in comment: Inverterts -> inverters.

Unit tests added in test_execute.py:
- discharge_upcoming_ge_eco_prewindow: GEC inverter stays in demand (ECO on)
  during pre-window period
- discharge_upcoming_std_prewindow: standard inverter still pre-programs the
  discharge window (force_export=True) unchanged

Closes #3630
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a GivEnergy Cloud (GEC) behavior where ECO mode could be toggled off during the “pre-window” export scheduling, causing the battery to stop supplying demand load before the export window actually begins.

Changes:

  • Update execute_plan() pre-window export scheduling to avoid forcing export mode for GE inverters that use immediate mode controls (ECO toggle / GE inverter mode).
  • Add execute tests covering upcoming export-window behavior for GE ECO toggle vs standard inverters.

Reviewed changes

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

File Description
apps/predbat/execute.py Avoids toggling GE ECO mode off in the pre-window export scheduling path by disabling force_export for GE immediate-mode inverters.
apps/predbat/tests/test_execute.py Adds coverage for the GE ECO-toggle pre-window case and confirms standard inverter pre-window behavior remains unchanged.

Comment on lines +403 to +405
# Don't turn off ECO mode for GE inverters except when we are within the export window as it will stop the battery being used
ge_inverters = inverter.inv_has_ge_eco_toggle or inverter.inv_has_ge_inverter_mode
inverter.adjust_force_export(inverter.inv_has_discharge_enable_time and not ge_inverters, discharge_start_time, discharge_end_time)
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

Spelling/clarity: comment says "GE Inverterts"; should be "GE inverters". Also this branch runs before we are within the export window, so consider rewording to avoid implying it applies inside the window.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@springfall2008 springfall2008 merged commit f90ac95 into main Mar 23, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix11 branch March 23, 2026 08:43
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.

GECloud turning off ECO mode before export slot

2 participants