SAFETY-78 review: card truth while the drain waits, more checks
- homeview: no "This one does not charge" while the draining battery waits (no floor then, so the other battery may charge from solar). - test_safety78: one wait line across a probe, a second episode logs again, the card while waiting, and a seeded sweep of the floor against every other claim (part 6). - DECISIONS: the wait case, and the measured N=1 peak and N=2 charge follow-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -641,10 +641,13 @@ def battery_rows(c, shadow, running, held=False):
|
||||
other = next((o.name for o in c.inverters if o is not inv
|
||||
and refusing(c, o) > 0 and not _off(c, o)), None)
|
||||
# SAFETY-78: another battery drains for its monthly cycle, so this
|
||||
# one never charges now.
|
||||
# one never charges now. Not while that drain waits: it files no
|
||||
# floor then, so this battery may charge from solar.
|
||||
waits = getattr(c, "_drain_waits", ())
|
||||
cycling = next((o.name for j, o in enumerate(c.inverters)
|
||||
if o is not inv and j < len(c.maints)
|
||||
and c.maints[j].phase == M_DRAIN), None)
|
||||
and c.maints[j].phase == M_DRAIN
|
||||
and o.name not in waits), None)
|
||||
role = None if tick is None else tick.roles.get(inv.name)
|
||||
# Only once a cycle has run with modes on (`tick`): before that
|
||||
# nothing is known, so nothing is claimed about the prices.
|
||||
|
||||
Reference in New Issue
Block a user