ALARMS key stops every auto-fix too, and says so
Muted, nothing fixes itself at all: no Spotify exception (while_muted is gone) and no any-hour READY fix; holds still fix and the Sunday stream-audio failover still switches. The key reads ALARMS OFF / AUTO-FIX OFF / TIL 12AM, and its note says both. The settings page's switch says the same. The mute's end is worked out at the press and kept: a watchdog that was not running at 23:59 no longer leaves the alarms muted until the next schedule change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -29,7 +29,7 @@ import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, HERE)
|
||||
from status_panel import RESTARTABLE, load_config, ready_keys # noqa: E402
|
||||
from status_panel import DAYS, RESTARTABLE, load_config, ready_keys # noqa: E402
|
||||
|
||||
# Defaults; "companion", "page_grid", "page_stale_seconds" and "page_hold_ms" in config.json override them.
|
||||
EXPORT_VERSION = 12 # Companion 5.0.7's export format
|
||||
@@ -196,7 +196,11 @@ def button(tid, tile, cfg):
|
||||
elif kind == "service":
|
||||
stale_text = "'%s\\n?'" % label
|
||||
press, hold = "service toggle", None
|
||||
note = "Press: turn service mode on/off until the next scheduled window starts or ends."
|
||||
sw = cfg.get("service_windows") or []
|
||||
always = len(sw) == 1 and set(sw[0].get("days", [])) == set(DAYS) and sw[0].get("start") == "00:00" and sw[0].get("end") in ("23:59", "00:00")
|
||||
note = ("Press: silence the alarms AND stop every auto-fix; press again to turn both back on. They come back by "
|
||||
"themselves %s. Holds still fix. The stream-audio failover still switches by itself on Sundays."
|
||||
% ("at midnight" if always else "when the alarm schedule next starts or ends"))
|
||||
else:
|
||||
stale_text = "'%s\\n?'" % label
|
||||
press = "ack " + tid
|
||||
|
||||
Reference in New Issue
Block a user