fix: remove persistent notifications from retry lock#587
fix: remove persistent notifications from retry lock#587tykeal wants to merge 1 commit intoFutureTense:mainfrom
Conversation
The autolock retry lock feature created persistent notifications when the door was open (unable to lock) and when the door closed (retrying). These were a holdover from the old automation-based architecture and are no longer needed since lock state is tracked by entities. Removes the send/dismiss of persistent notifications in _timer_triggered() and _door_closed(), along with the now-unused imports of send_persistent_notification, dismiss_persistent_notification, and slugify. Closes FutureTense#384 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andrew Grimberg <tykeal@bardicgrove.org>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #587 +/- ##
==========================================
+ Coverage 84.14% 88.80% +4.66%
==========================================
Files 10 27 +17
Lines 801 3207 +2406
==========================================
+ Hits 674 2848 +2174
- Misses 127 359 +232
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Removes persistent notification creation/dismissal from the autolock “retry lock” flow in the Keymaster coordinator, addressing reported user annoyance (#384) now that lock state is tracked via entities.
Changes:
- Removed
send_persistent_notificationcalls from_timer_triggered()when a retry is queued due to an open door. - Removed
dismiss_persistent_notificationand follow-up “door closed” persistent notification from_door_closed(). - Cleaned up now-unused imports (
slugify, persistent notification helpers).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
firstof9
left a comment
There was a problem hiding this comment.
This looks good to me.
Is there another notice that get's generated by chance however, similar to when the lock code is used?
I would figure the door not auto locking would be something people would want a notification for.
|
This is all the UI notifications we have left in the system at this point. I'm waffling on completely removing the notification like this does or having it autoclear instead of lingering when there isn't a reason for it to. |
|
Keymaster used to have a notification that would auto-clear after the yaml generation was completed. |
Summary
Remove persistent notifications from the autolock retry lock feature.
Problem
When the retry lock option fires and the door is open, a persistent notification is created informing the user the lock couldn't lock. When the door closes and retry fires, the old notification is dismissed and a new one is created. These notifications are a holdover from the old automation-based architecture and are no longer needed — lock state is already tracked by entities. Users (see #384) have reported these notifications as an annoyance since they must be manually cleared.
Changes
coordinator.py: Removed persistent notification creation in_timer_triggered()(door open notification) and_door_closed()(dismiss + door closed notification). Removed now-unused imports ofsend_persistent_notification,dismiss_persistent_notification, andslugify.This is a pure deletion — no new code, no behavioral changes beyond the notification removal. The retry lock logic itself (setting
pending_retry_lock, calling_lock_lock()on door close) remains unchanged.Closes #384