Feat: Override load_today for GECloud (EMS), Huwaei 100% and slow charge bug fixes, Component error handler, doc changes#3649
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances Predbat’s cloud auto-configuration (GE Cloud + Solis Cloud) by adding opt-out overrides for specific load/PV sensors, and includes several bug fixes and documentation/template updates to improve reliability and configuration clarity.
Changes:
- Add new configuration flags to allow overriding specific auto-configured sensors (
ge_cloud_load_today_ignore,solis_cloud_pv_load_ignore). - Adjust component startup sequencing by introducing a new “phase 2” (moving SolarAPI later) to avoid startup race conditions with cloud components.
- Fix/adjust integration behaviors (GE Cloud EVC scaling, Huawei charge/discharge power handling) plus broad doc/template wording updates.
Reviewed changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/solis_cloud.yaml | Updates Solis Cloud template options and documents new PV/load override flag. |
| templates/huawei.yaml | Updates Huawei service templates to pass {power} for charge/discharge services. |
| templates/givenergy_ems.yaml | Updates GE Cloud EMS template, adds GE Cloud direct/automatic settings and override guidance. |
| templates/givenergy_cloud.yaml | Tweaks header text for clarity. |
| docs/plugins.md | Documentation wording updates (“initialise”). |
| docs/output-data.md | Extends example automation to restart Predbat when components are unhealthy. |
| docs/load-ml.md | Documentation wording updates (“optimised/initialised/optimiser”). |
| docs/inverter-setup.md | Restructures intro, fixes EMS anchor link, adds GE Cloud override guidance and curve warning note. |
| docs/faq.md | Aligns wording with updated “Info:” log phrasing for charge-curve messages. |
| docs/configuration-guide.md | Clarifies/updates battery cycle cost default explanation. |
| docs/components.md | Documentation wording updates (“optimisation/optimise”). |
| docs/apps-yaml.md | Documents new ge_cloud_load_today_ignore and solis_cloud_pv_load_ignore options and improves GE/SolaX/Solis sections. |
| coverage/profile_debug.py | Output wording updates (“optimisation”). |
| coverage/dev_tests/test_process_load_power.py | Comment wording updates (“initialise”). |
| apps/predbat/web_mcp.py | Docstring wording updates (“initialise”). |
| apps/predbat/web_helper.py | Updates web UI JS comments and modifies plan-renderer timezone-offset regex. |
| apps/predbat/web.py | Comment wording updates (“initialise”). |
| apps/predbat/tests/test_web_if.py | Comment wording updates (“initialised”). |
| apps/predbat/tests/test_temperature.py | Wording updates (“initialisation/initialised”). |
| apps/predbat/tests/test_solis.py | Adds get_arg() stub for Solis tests to support new config flag access. |
| apps/predbat/tests/test_load_ml.py | Wording updates (“optimiser”). |
| apps/predbat/tests/test_hahistory.py | Wording updates (“initialisation/initialised”). |
| apps/predbat/tests/test_ge_cloud.py | Updates GE Cloud tests (incl. EVC scaling expectations) and wording updates. |
| apps/predbat/tests/test_fox_oauth.py | Comment wording updates (“initialise”). |
| apps/predbat/tests/test_fox_api.py | Comment wording updates (“initialises/initialisation”). |
| apps/predbat/tests/test_fill_load_from_power.py | Comment wording updates (“initialise”). |
| apps/predbat/tests/test_fetch_pv_forecast.py | Comment wording updates (“initialise”). |
| apps/predbat/tests/test_dynamic_load.py | Comment wording updates (“initialise”). |
| apps/predbat/tests/test_carbon.py | Wording updates (“initialisation/initialised”). |
| apps/predbat/tests/test_axle.py | Wording updates (“initialisation/initialised”). |
| apps/predbat/temperature.py | Docstring wording updates (“initialise”). |
| apps/predbat/solis.py | Adds solis_cloud_pv_load_ignore behavior to allow overriding Solis load/PV sensors in auto-config mode. |
| apps/predbat/solcast.py | Changes PV calibration daily totals accumulation to round each step. |
| apps/predbat/solax.py | Formatting cleanups and wording updates (“initialise”). |
| apps/predbat/predbat.py | Adds component startup phase 2 and starts it during initialization. |
| apps/predbat/plugin_system.py | Log/comment wording updates (“initialise”). |
| apps/predbat/ohme.py | Docstring wording updates (“initialise”). |
| apps/predbat/octopus.py | Docstring/log/comment wording updates (“initialise”). |
| apps/predbat/oauth_mixin.py | Docstring wording updates (“initialise”). |
| apps/predbat/load_predictor.py | Docstring/comment wording updates (“initialise/optimiser”). |
| apps/predbat/load_ml_component.py | Docstring/comment/log wording updates (“initialise/reinitialise”). |
| apps/predbat/hass.py | Console error wording updates (“initialise”). |
| apps/predbat/ha.py | Docstring wording updates (“initialise”). |
| apps/predbat/gecloud.py | Adds ge_cloud_load_today_ignore, adjusts EVC energy/power scaling and log message text. |
| apps/predbat/fox.py | Docstring/comment wording updates (“initialise”). |
| apps/predbat/fetch.py | Comment wording updates (“initialised”). |
| apps/predbat/db_manager.py | Docstring wording updates (“initialise”). |
| apps/predbat/config.py | Enables Huawei charge_discharge_with_rate, and adds config schema entries for new override flags. |
| apps/predbat/components.py | Moves SolarAPI to phase 2, adds phase 2 initialization during restart, and updates wording. |
| apps/predbat/component_base.py | Docstring wording updates (“initialise/initialisation”). |
| apps/predbat/carbon.py | Docstring wording updates (“initialise”). |
| apps/predbat/axle.py | Docstring wording updates (“initialise”). |
| apps/predbat/alertfeed.py | Docstring wording updates (“initialise”). |
| .github/copilot-instructions.md | Documentation wording updates (“optimisation”). |
|
Not sure if you saw my comment above, what is the point of solis_cloud_pv_load_ignore? # if solis_cloud_pv_load_ignore is set to true, override Solis cloud sensors and use load/pv_today/power entries defined in apps.yaml
if not self.get_arg("solis_cloud_pv_load_ignore", default=False):
self.set_arg("load_today", [f"sensor.{self.prefix}_solis_{device}_total_load_energy" for device in devices])
self.set_arg("pv_today", [f"sensor.{self.prefix}_solis_{device}_pv_energy_total" for device in devices])
self.set_arg("load_power", [f"sensor.{self.prefix}_solis_{device}_load_power" for device in devices])
self.set_arg("pv_power", [f"sensor.{self.prefix}_solis_{device}_pv_power" for device in devices]) |
|
I did reply above Trefor #3649 (comment) The OP has a Solis inverter and a second inverter so the Solis cloud doesn't have a total view of his PV and load data. The override (which for most people won't be set) provides a way to override the solis cloud with custom apps.yaml templates |
New feature:
Bug fixes:
Documentation changes: