Skip to content

Commit 7c96080

Browse files
committed
docs(automation): clarify battery-SOC type is internal, not a register write
The reference portal's 'Battery state of charge' control requires a direct battery data source (BMS/emulated BMS) and switches its own internal output source priority — it does NOT write a Luxpower holding register. lux-mon mirrors this faithfully: the automation evaluates the SOC boundary line and reports the intended grid/battery source, but does not fabricate a register write the hardware doesn't support. Documented the caveat in _apply_battery_soc.
1 parent f834122 commit 7c96080

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

‎collector/automation.py‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,19 @@ def _apply_battery_soc(
570570
action = auto.evaluate(snapshot, now)
571571
if action is None:
572572
return []
573-
# Map grid/battery to output source priority register.
574-
# "grid" -> output source priority = grid; "battery" -> battery.
575-
# We use the "ac_first" / output source concept via a holding register.
576-
# For now, log the intended action; the actual register mapping is
577-
# handled by the target register list.
573+
574+
# NOTE: In the reference portal, "Battery state of charge" control is
575+
# an *internal* feature that requires a direct battery data source
576+
# (BMS or emulated BMS). It does NOT write a Luxpower holding
577+
# register; it switches the portal's own "output source priority"
578+
# between grid and battery based on the SOC boundary line.
579+
#
580+
# lux-mon mirrors this: the automation evaluates the SOC boundary and
581+
# reports the intended source (grid/battery), but the actual
582+
# grid/battery switching is performed by the inverter's own AC-first
583+
# schedule / charge-priority settings, not by a single writable
584+
# register. We therefore log the intended action rather than fabricate
585+
# a register write that the hardware does not support.
578586
results: List[Dict[str, Any]] = []
579587
results.append({
580588
"rule_id": auto.id,

0 commit comments

Comments
 (0)