Fix Solis crash that prevented any plan being produced
What's Changed
A single-fix hotfix for Solis users. If you have a Solis inverter, upgrade from v8.48.4 immediately —
on most Solis installs v8.48.4 cannot produce a plan at all.
Bug fixes
The nominal_voltage fix in v8.48.4 (#4502) added a once-per-inverter warning for installs where the
battery capacity has to be estimated from the live measured voltage. The set that tracked which
inverters had already been warned was never initialised on the real component, so the first
publish_entities() run raised:
Error: SolisAPI: 'SolisAPI' object has no attribute 'capacity_voltage_warned'
That aborted the update cycle, so Predbat kept trying to calculate and never produced a plan. The
warning sits on the branch taken whenever solis_nominal_voltage is not set in apps.yaml — which is
every install that has not explicitly configured it, so in practice this hit nearly all Solis users on
v8.48.4.
- fix(solis): initialise capacity_voltage_warned so publish_entities stops crashing by @springfall2008 in #4555
Setting solis_nominal_voltage in apps.yaml also avoids the crash and remains worth doing on its own
merits — it gives an accurate, stable battery capacity instead of one estimated from a voltage that
drifts with charge state.
Testing
The whole Solis test suite passed against a component that could not survive a single real poll, because
MockSolisAPI replaces __init__ wholesale and had stubbed the attribute the production path was
missing. A parity guard now constructs the real component and asserts it sets every attribute the mock
stubs, so this class of mock/real divergence fails in CI rather than on a live inverter.
Full Changelog: v8.48.4...v8.48.5