UX-11: safety log lines give one plain sentence and the code, the figures go to DEBUG
- Every WARNING/ERROR line that reported a safety reason (direction, delivery, stuck meter, stale reading, peak guard, circulation, over-rating) now ends in the reason's code (messages.reason_code()). The reason itself, figures and limits included, is on a DEBUG line right after it and in the action log. - The reasons and state.json are unchanged, so an old state file loads and shows the same way: every saved reason opens with its code. - test_messages part 6 checks every WARNING+ line at 25 words as logged; nine non-safety families are listed with a reason and capped. The byte pin in test_watchdog now pins the meaning, in order. - The meter logs one WARNING per quiet episode, and INFO when back, so the red row's "the add-on log shows why" holds. The Why line past the hold names the missing reading. Action log: "25 engagements", "Shadow mode off: ...". No trigger, latch, threshold, log level, notification id, cadence, row colour or banner order changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyR88rXETvwhTgx6yHE39p
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c4032ebc21
commit
29837dfaa7
@@ -3095,8 +3095,9 @@ stop control on the add-on page.
|
||||
|
||||
This part is for installers. The texts live in `app/messages.py` and follow
|
||||
`STYLE.md`. Every notification keeps a fixed `notification_id`, so a repeat
|
||||
replaces the card. The full figures and reason codes are on the ERROR or
|
||||
WARNING line of the add-on log.
|
||||
replaces the card. The ERROR or WARNING line of the add-on log names the
|
||||
reason code. The full figures are on the DEBUG line logged right after it
|
||||
(log level `debug`) and in `events` in the `status` JSON.
|
||||
|
||||
| Title | Severity | id | Card |
|
||||
|---|---|---|---|
|
||||
@@ -3223,8 +3224,9 @@ ends. That row says how to clear it.
|
||||
|
||||
### For installers: status page
|
||||
|
||||
The texts are in `app/messages.py`. The full figures of any alarm are on its
|
||||
ERROR or WARNING line in the add-on log.
|
||||
The texts are in `app/messages.py`. An alarm's ERROR or WARNING line names its
|
||||
reason code, and its full figures are on the DEBUG line right after it and in
|
||||
`events` in the `status` JSON.
|
||||
|
||||
- **Stuck-meter check: off** needs `meter_source: homewizard_local` (label
|
||||
“Where the meter reading comes from”), a `max_w` (“Inverter rating”) and a
|
||||
@@ -3246,9 +3248,13 @@ ERROR or WARNING line in the add-on log.
|
||||
check** SAFETY-42.
|
||||
- **Month peak** and **15-minute periods measured** are TARIFF-01 and
|
||||
TARIFF-13. The store's state at start is the INFO line `Month peak store:
|
||||
…`, and the peak guard's full reason is on its log line.
|
||||
…`, and the peak guard's full reason is on the DEBUG line after its ERROR.
|
||||
- ***name*: battery power reading stopped changing** is SAFETY-37/56/57. The
|
||||
ERROR line carries the full `STALE_READING` reason and when it clears.
|
||||
ERROR line says when it clears and names `STALE_READING`. The full reason,
|
||||
with both possible causes, is on the DEBUG line after it.
|
||||
- **Meter: no reading for …** (red): the add-on logs one WARNING when the
|
||||
meter goes quiet, "No meter reading for …", and an INFO line when readings
|
||||
return. Past `stale_input_s` the **Why** line names the missing reading.
|
||||
- The table at the top: **Why** is `messages.why()`, the arbiter's answer in
|
||||
words (`Resolution.explain()` stays on the log). **Tariff**, **Price
|
||||
history**, **Arbitrage** and **Shadow mode** keep every figure they had
|
||||
|
||||
Reference in New Issue
Block a user