OPT-38 round 2: a kept tomorrow reading is flagged kept only from 20:00
checks / unit (pull_request) Successful in 23m11s
infra-pin / fresh (pull_request) Successful in 1s

Before the bell ends it replaced today's Home line and the event log with
the kept-for-tonight wording. stand_in() docstring covers the tomorrow case.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-07 06:02:00 +01:00
co-authored by Claude
parent c43873b142
commit 0bacafadf0
4 changed files with 49 additions and 12 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ for label, tm in (("stale", st(12.0, at(4, 9, 5))), ("unavailable", GONE)):
check(f"14:00, today fresh, tomorrow {label} since 09:05 (over 3 h): "
"the 09:05 figure covers it, kept (OPT-38: at any hour)",
fd is not None and fd.tomorrow is not None
and fd.tomorrow.kwh == 12.0 and fd.kept)
and fd.tomorrow.kwh == 12.0 and not fd.kept)
fn = rs(st(0.1, at(4, 20, 55)), tm, at(4, 21, 0), h9)[0]
check(f"21:00, tomorrow {label}: the 09:05 figure covers it, kept",
fn is not None and fn.tomorrow is not None