MAINT-14: maintenance with no SoC reading: charge times out, drain holds at 0 W
checks / unit (pull_request) Successful in 35m13s
infra-pin / fresh (pull_request) Successful in 1s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-10-08 20:37:01 +02:00
co-authored by Claude Opus 5.5
parent 8a17711f60
commit f39e52efd3
4 changed files with 507 additions and 10 deletions
+2 -1
View File
@@ -122,7 +122,8 @@ m = Maintenance(cfg, FakeStore())
m.force_start(t0)
r = m.tick(t0 + timedelta(minutes=5), soc=None)
check("no SoC: holds the phase rather than guessing", r.phase == DRAIN)
check("no SoC: still commands the drain rate", r.setpoint_w == 2500)
check("no SoC: MAINT-14 the drain holds at 0 W, never discharges",
r.owns_setpoint and r.setpoint_w == 0.0)
m = Maintenance(cfg, FakeStore())
m.store.set("phase", "banana")