Fix GECloud ECO mode being turned off before export slot starts#3631
Merged
springfall2008 merged 3 commits intomainfrom Mar 23, 2026
Merged
Fix GECloud ECO mode being turned off before export slot starts#3631springfall2008 merged 3 commits intomainfrom
springfall2008 merged 3 commits intomainfrom
Conversation
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
Contributor
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Summary
Fixes #3630
Root Cause
For GEC (GivEnergy Cloud) inverters (
inv_has_ge_eco_toggle=True), the pre-window scheduling path inexecute_plan()was calling:Since GEC has
has_discharge_enable_time=True, this passedforce_export=True, which immediately calledadjust_inverter_mode(True)insideadjust_force_export— turning off the ECO mode toggle switch up toset_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=Falseso ECO mode is preserved. The discharge window start/end times are still written to the registers as before.Tests
Two new test cases in
test_execute.py:discharge_upcoming_ge_eco_prewindow— GEC inverter with export starting in 30 min stays inDemandstatus (force_export=False), ECO mode ondischarge_upcoming_std_prewindow— standard inverter behaviour unchanged, discharge window pre-programmed (force_export=True)