0.3.0 — audit pass: schedule rearm, random Sonos track, MIT licence
Pre-release
Pre-release
Audit-driven cleanup pass. All changes are backwards-compatible; bumped to 0.3.0 because the volume of fixes is more than a patch warrants.
Fixed
- Schedule never rearmed after a natural fire. When the alarm ran end-to-end (ramp completes → music plays to fade-up → music completes), the coordinator dropped to IDLE but never called
async_recompute_schedule. Result:sensor.<slug>_next_alarmkept pointing at the just-fired (past) time and noasync_track_point_in_timewas armed for the next day until the user poked a dependency. Same root cause covered the early-return branches of_async_on_music_start(player unavailable / no media)._set_state(STATE_IDLE)now triggers the recompute on every transition into IDLE, regardless of how IDLE was reached. - Auto-dismiss timer was re-armed on every snooze resume. Each cycle restarted the timer at
auto_dismiss_minfrom the resume moment, so three snoozes effectively extended auto-dismiss by3 × snooze_min. The deadline is now captured at the first PLAYING transition and preserved across snooze cycles — N minutes after the alarm originally fired always means N minutes. - Tapping the mode tile during snooze disarmed the alarm. The tile showed
Music in M:SSand tapping disabledswitch.<slug>_enabled. Mode-tile tap is now a no-op while the alarm is active (ramping, playing, or snoozing); Snooze / Dismiss / Cancel ramp are the explicit controls. - Card instance-name was locale-fragile — it parsed the enabled-switch's
friendly_nameand stripped a literal "Enabled" suffix, which only works in English.sensor.<slug>_next_alarmnow carries the user-given instance name as aninstance_nameattribute and the card reads it from there. parse_action_idaccepted empty entry_ids.wake_alarm:snooze:was parsed as("snooze", ""), which could never resolve to a coordinator. Now rejected.
Changed
- Multi-Sonos: random track-skip on every fire and snooze resume. Sonos shuffle reorders the queue but doesn't pick a random starting track, so every alarm and every snooze used to begin on the same track from the configured favourite. The music sequence now skips 1–4 tracks forward (
media_next_track, random per fire) after the 5-second queue settle and before the fade, so the wake-up song is genuinely different each cycle. Single-player path is unchanged (it doesn't shuffle in the first place). - Volume slider displays as percentage (0–100%) instead of the raw 0.0–1.0 fraction. The underlying
number.<slug>_volumeentity still stores 0.0–1.0; the card does the multiply/divide. - Cancel-ramp button visible on the main view during ramping — used to be settings-only. Snooze / Dismiss are still always visible while active.
- Card ticker only runs during snooze. The 1Hz
requestUpdatethat drives the countdown used to run for the lifetime of every dashboard; it now starts when state transitions to SNOOZING and stops afterward. async_call_light_turn_onis now properly async (was a non-async def returning a coroutine — worked but read oddly).
Docs
LICENSEis now an actual MIT licence instead of an empty file.BRIEF.mdday-toggle entity IDs updated to the v2d1_mon..d7_sunscheme.
Upgrading
HACS → Wake Alarm → ⋮ → Redownload → pick 0.3.0 → restart HA. From 0.2.1 onward the versioned card URL handles cache-busting automatically.