UX-10 review: the line as logged gets the red-alarm shape, clamp lines at 30 words, plain HA 400
checks / unit (pull_request) Successful in 9m3s
infra-pin / fresh (pull_request) Successful in 2s

Part 6 checked the quoted reason alone, so title + reason + tails logged
as 4+ sentences. It now also checks the whole line (at most 3 sentences,
none over 30 words); 25 lines failed and are rewritten (one-sentence
wrappers, two-sentence circulation and peak reasons, STALE_READING's
fixed limits on a DEBUG line). The clamp lines for one inverter are
pinned at 30 words with OUTPUT_CLAMP and the numbers kept. Home
Assistant's bare '400: Bad Request' while it loads becomes one plain
line; still WARNING, throttled, a failed write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 12:08:38 +02:00
co-authored by Claude Opus 5.5
parent f1a660881c
commit e0b578756f
13 changed files with 231 additions and 98 deletions
+5 -5
View File
@@ -1358,12 +1358,12 @@ def _degrade(opts, read, since, until, stamp) -> TariffPlan:
"no tariff at all.", e)
profile = None
if profile is None:
_LOG.warning("The price feed failed: %s. No fixed tariff is set to "
"fall back to, so trading is off. Peak limiting and home "
"use go on.", read.reason)
_LOG.warning("The price feed failed and no fixed tariff is set, so "
"trading is off, while peak limiting and home use go on. "
"%s.", read.reason)
return TariffPlan(read, None, "none")
_LOG.warning("The price feed failed: %s. The fixed tariff is used "
"instead, marked as estimated, and trading is off.",
_LOG.warning("The price feed failed, so the fixed tariff is used "
"instead, marked as estimated, and trading is off. %s.",
read.reason)
points = profile.series(since, until, provisional=True)
return TariffPlan(