Solis: keep a PV-only inverter in pv_today/pv_power (#4922) - #4923
Merged
Conversation
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
springfall2008
commented
Sep 3, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The updated Solis documentation guidance omits load_power from the manual-override instructions for solis_cloud_pv_load_ignore, which can mislead users into an incomplete configuration.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes Solis Cloud auto-configuration so PV-only inverters (reported by Solis Cloud as having no battery) are still included in pv_today / pv_power totals, while remaining excluded from battery/control and load/grid-related arguments to avoid double-counting on shared-CT installations.
Changes:
- Split Solis device selection so
pv_today/pv_poweruse all discovered inverters while control/battery args stay battery-only, and emit a log line when PV-only devices are included in PV totals. - Add Solis unit tests covering both the mixed battery + PV-only scenario and the all-battery scenario.
- Document the PV-only inverter behavior in the Solis component docs.
File summaries
| File | Description |
|---|---|
| docs/components.md | Documents the PV-only inverter split between PV totals vs battery/control/load/grid behavior. |
| apps/predbat/solis.py | Adjusts automatic_config() to include PV-only inverters in PV totals without enrolling them as battery inverters. |
| apps/predbat/tests/test_solis.py | Adds regression tests for the new PV totals behavior and logging. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - Leave `soc_max` unset and allow Predbat to automatically detect battery size from historical charging data (requires several days of data) | ||
| - Supports both V1 (older firmware) and V2 (newer firmware) time window formats | ||
| - Automatic configuration available - sets up all required Predbat sensors automatically | ||
| - **PV-only inverters**: an inverter Solis Cloud reports as having no battery is never managed as a battery inverter and is never written to, but its generation is still included in `pv_today` and `pv_power` so the array total covers the whole roof. Its load and grid readings are left out, as those registers can overlap with the battery inverter's on a shared-CT installation - set `pv_today`/`pv_power`/`load_today` manually with `solis_cloud_pv_load_ignore: true` if you need something different |
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.
This is an automated draft PR generated from issue #4922 — a maintainer should review it before merging.
Fixes #4922
Summary
SolisAPI.automatic_config()built onedeviceslist from the battery-filtered inverters and used it for every arg, so an inverter Solis Cloud reports as having no battery was dropped from the PV totals as well as from battery control.pv_today/pv_powernow use a separatepv_deviceslist covering every discovered inverter — Predbat sums those arg lists, so a PV-only inverter's generation is simply added to the array total. Nothing else changes:num_inverters,inverter_typeand all control/battery args stay battery-only, so a PV-only inverter is still never written to.Per the maintainer's note on the issue, this is the PV half only.
load_today/load_power/import_today/export_today/grid_powerdeliberately stay on the battery inverters, since on a shared-CT installation those registers can overlap between inverters and summing them would risk double-counting. A one-line log names any battery-less inverters folded into the PV totals, anddocs/components.mdrecords the split (including thesolis_cloud_pv_load_ignoreescape hatch for sites that need something different).Testing
cd coverage && ./run_pre_commit— all hooks Passed, and the quick suite it runs reportedAll tests passed (4 slow tests skipped, total time: 107.37s).tools/triage_test.sh solis— exit 0,All tests passed.Two new tests in
apps/predbat/tests/test_solis.py(both registered inrun_solis_tests()):test_automatic_config_keeps_no_battery_inverter_in_pv_totals— a two-inverter site with one "No Battery" unit gets both inverters inpv_today/pv_power, whilesoc_percent,charge_limit,reserve,grid_power,load_today,load_power,import_todayandexport_todaystay on the battery inverter alone.test_automatic_config_pv_totals_unchanged_when_all_have_batteries— with no PV-only inverter present the PV args are unchanged and the new log line is not emitted.