UX-08 phase 2a: short, plain notifications, and a ratchet for the rest
Every HA notification the add-on raises now has a title of at most 5 everyday words and a one-sentence body; a red alarm may use three so no action is lost. The texts live in app/messages.py, the rule in STYLE.md, and the detail that moved out in DOCS.md "Notifications", which each body links to. No notification_id, trigger or cadence changed. test_messages.py enforces the rule on every notification, fails any notification worded outside app/messages.py, and ratchets the kinds not yet rewritten (rows, banners, refusals, logs, options) through a shrinking allowlist of 200. Six tests re-pinned from prose to meaning. 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
2503de124e
commit
50ccea3dd7
@@ -33,6 +33,7 @@ from datetime import datetime, timedelta, timezone
|
||||
|
||||
from named_absence import given, present
|
||||
|
||||
from app import messages
|
||||
from app.control import Tuning
|
||||
from app.delivery import (
|
||||
DELIVERY_OPTION_DEFAULTS, DELIVERY_SHARE_FRACTION, REASON_CODE,
|
||||
@@ -1232,7 +1233,7 @@ check("the notification NAMES THE UNIT - in its id, its title and its body - "
|
||||
check("...and it says, in the operator's own sentence, that nothing has been "
|
||||
"commanded differently. An alarm that let somebody believe the add-on "
|
||||
"had handled it would be worse than no alarm",
|
||||
"NOTHING HAS BEEN COMMANDED DIFFERENTLY" in _note[2]["message"])
|
||||
"nothing was changed and control keeps running" in _note[2]["message"])
|
||||
print(f" id={_note[2]['notification_id']!r} title={_note[2]['title']!r}")
|
||||
_before_calls = len(_rh2.calls)
|
||||
await_again = asyncio.run(_r2.check_not_delivering())
|
||||
|
||||
Reference in New Issue
Block a user