OPT-27 round 3: the kept-forecast wording states the 12 h limit (text only)
checks / unit (pull_request) Successful in 15m27s
infra-pin / fresh (pull_request) Successful in 1s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-10-30 21:29:29 +01:00
co-authored by Claude
parent 13b61d586a
commit b9dea6d90d
3 changed files with 7 additions and 5 deletions
@@ -20,7 +20,7 @@ still keeps a run under way when a read is lost.
sensor that is missing or stale, never one with a bad value or unit, and: sensor that is missing or stale, never one with a bad value or unit, and:
- for up to `FRESH_S` when the sensor is missing: a short outage, any time of day; - for up to `FRESH_S` when the sensor is missing: a short outage, any time of day;
- from the end of the bell (20:00 local, `BELL_TO_H`) until local midnight + 3 h - from the end of the bell (20:00 local, `BELL_TO_H`) until local midnight + 3 h
(`KEPT_UNTIL_H`), however old; (`KEPT_UNTIL_H`), if the reading is at most `KEPT_MAX_AGE_S` (12 h) old when used;
- the day it is for: a today figure only on that day, a tomorrow figure as - the day it is for: a today figure only on that day, a tomorrow figure as
tomorrow until midnight and, if the today sensors are still stale, as today's tomorrow until midnight and, if the today sensors are still stale, as today's
until midnight + 3 h (all sensors of the sum are needed, as for any sum); until midnight + 3 h (all sensors of the sum are needed, as for any sum);
+2 -1
View File
@@ -34,7 +34,8 @@ evening and api.forecast.solar is sometimes out for a poll. A kept reading
stands in for its sensor (a) for up to `FRESH_S` when the sensor is missing stands in for its sensor (a) for up to `FRESH_S` when the sensor is missing
or unavailable, as a sensor that merely stopped updating is already or unavailable, as a sensor that merely stopped updating is already
tolerated, and (b) from the end of the bell (`BELL_TO_H`) until local tolerated, and (b) from the end of the bell (`BELL_TO_H`) until local
midnight + `KEPT_UNTIL_H` however old it is. Never beyond that, and never midnight + `KEPT_UNTIL_H`, if it is at most `KEPT_MAX_AGE_S` old when used.
Never beyond that, and never
for another day: a today figure is only today's, a tomorrow figure is for another day: a today figure is only today's, a tomorrow figure is
tomorrow's until midnight and then, until midnight + 3 h, today's. tomorrow's until midnight and then, until midnight + 3 h, today's.
DECISIONS/OPT-27-last-fresh-forecast-for-the-night.md. DECISIONS/OPT-27-last-fresh-forecast-for-the-night.md.
+4 -3
View File
@@ -7,8 +7,9 @@ Forecast.Solar site was "no forecast": a price mode's night cheap run needed
fresh reading of each sensor, for the day it is FOR: fresh reading of each sensor, for the day it is FOR:
* up to `FRESH_S` when the sensor is missing or unavailable (a short outage); * up to `FRESH_S` when the sensor is missing or unavailable (a short outage);
* from the end of the bell (20:00) until local midnight + 3 h however old it * from the end of the bell (20:00) until local midnight + 3 h, if the reading
is (the night plan); never beyond, never for another day. is at most `KEPT_MAX_AGE_S` (12 h) old when used (the night plan); never
beyond, never for another day.
DECISIONS/OPT-27-last-fresh-forecast-for-the-night.md. DECISIONS/OPT-27-last-fresh-forecast-for-the-night.md.
@@ -166,7 +167,7 @@ check("... its sun is counted on the day it is for (06:00-20:00 on the 4th)",
and fmid.between(at(4, 3, 0), at(4, 7, 0)) > 0.0) and fmid.between(at(4, 3, 0), at(4, 7, 0)) > 0.0)
check("03:01 (midnight + 3 h): not used any more", check("03:01 (midnight + 3 h): not used any more",
rs(GONE, GONE, at(4, 3, 1), h2)[0] is None) rs(GONE, GONE, at(4, 3, 1), h2)[0] is None)
check("... and not the next evening either (older than one night)", check("... and not the next evening either (past midnight + 3 h)",
rs(GONE, GONE, at(4, 22, 0), h2)[0] is None) rs(GONE, GONE, at(4, 22, 0), h2)[0] is None)
fe = rs(st(0.1, at(4, 21, 50)), GONE, at(4, 22, 0), h2)[0] fe = rs(st(0.1, at(4, 21, 50)), GONE, at(4, 22, 0), h2)[0]
check("... the next evening, with today fresh and tomorrow's sensor down, " check("... the next evening, with today fresh and tomorrow's sensor down, "