SMA-2: each inverter is reached through a driver; GoodWe behaviour unchanged
checks / unit (pull_request) Successful in 23m14s
infra-pin / fresh (pull_request) Successful in 2s

app/drivers.py holds one Driver per roster entry (configured, actuator_id,
limits, read, write, release, probe, link_stale_s, batt_bound, settle_s, brand,
words). GoodWeEsphomeDriver makes the calls the code it replaced made, in the
same order. Inverter gets driver; has_writer, is_live and link_note read it. The
SoC/power read, the write, the device range (run_control, amain, the settings
panel), rule 2 per unit and the SAFETY-28 census go through it.

setpoint_entity is optional per entry beside driver, host, port, unit_id and
maintenance; only goodwe_esphome is selectable, the rest are checked and unused.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-07 11:28:47 +01:00
co-authored by Claude
parent 23ff9d0920
commit e56eeef8f0
18 changed files with 1238 additions and 65 deletions
+13
View File
@@ -302,6 +302,19 @@ DERIVED = {
HIDDEN: dict = {"price_service_token": "a secret, set on the Configuration tab"}
# SMA-2. Per-entry keys of the inverter list the page never shows. They pick and
# address an inverter driver, only `goodwe_esphome` is selectable, and nothing
# reads the other four yet. An entry's keys the page does not draw travel
# through a save as stored (uimodel._roster_decode keeps the whole entry).
ROSTER_HIDDEN: dict = {
"driver": "only goodwe_esphome for now; empty means that",
"host": "not read yet",
"port": "not read yet",
"unit_id": "not read yet",
"maintenance": "not read yet",
}
def fields():
"""Every field once, in page order, roster fields after `inverters`."""
for group in GROUPS: