SMA-2: each inverter is reached through a driver; GoodWe behaviour unchanged
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:
co-authored by
Claude
parent
23ff9d0920
commit
e56eeef8f0
@@ -942,11 +942,17 @@ schema:
|
||||
# batteries, whereas an absent capacity has an honest answer - no opinion
|
||||
# about the split, every unit weighs 1.0, which is what shipped.
|
||||
#
|
||||
# ⚠️ FOUR KEYS ARE REQUIRED PER ENTRY AND THAT IS DELIBERATE. An entry with
|
||||
# SMA-2. `driver` empty means goodwe_esphome, the only choice for now.
|
||||
# `host`, `port`, `unit_id` and `maintenance` are accepted and checked for
|
||||
# shape; nothing reads them yet (DECISIONS/SMA-2-driver-seam.md).
|
||||
#
|
||||
# ⚠️ THREE KEYS ARE REQUIRED PER ENTRY AND THAT IS DELIBERATE. An entry with
|
||||
# no `name` has no Store namespace and would share another unit's SAFETY-02
|
||||
# latch; one with no `setpoint_entity` is a unit nothing can command; one with
|
||||
# no `max_w` would have to borrow a rating, which is the sibling-grading
|
||||
# defect DEV-02 removed; `bms_soc_floor` is SAFETY-32's (options block above).
|
||||
# latch; one with no `max_w` would have to borrow a rating, which is the
|
||||
# sibling-grading defect DEV-02 removed; `bms_soc_floor` is SAFETY-32's
|
||||
# (options block above). `setpoint_entity` WAS A FOURTH; since SMA-2 it is the
|
||||
# GoodWe driver's own key, so a unit nothing can command is refused by
|
||||
# validate.py rule 9(d) per driver rather than by this schema.
|
||||
# The optional keys are the sensors, whose absence honestly means "this unit
|
||||
# reports none", and `capacity_kwh`.
|
||||
#
|
||||
@@ -958,13 +964,18 @@ schema:
|
||||
# test_inverter.py part 12 asserts the ordering is still hostile.
|
||||
inverters:
|
||||
- name: str
|
||||
setpoint_entity: str
|
||||
setpoint_entity: str?
|
||||
max_w: int(100,5000)
|
||||
bms_soc_floor: int(0,50)
|
||||
soc_entity: str?
|
||||
batt_entity: str?
|
||||
batt_invert: bool?
|
||||
capacity_kwh: float(0.1,200)?
|
||||
driver: list(goodwe_esphome)?
|
||||
host: str?
|
||||
port: port?
|
||||
unit_id: int(0,247)?
|
||||
maintenance: bool?
|
||||
|
||||
estop_fitted: bool
|
||||
battery_modes_enabled: bool
|
||||
|
||||
Reference in New Issue
Block a user