4 notifications can cause clearing sticky/persistant to fail
See original GitHub issueHome Assistant Android version: 2021.1.1-full
Android version: 11
Phone model: Pixel 5
Home Assistant version: 2021.1.5
Last working Home Assistant release (if known): None that I know of
Description of problem: If there are more than three sticky and persistant notifications, and the last three sent are cleared before the first one sent. The last one cleared will fail to clear.
Steps to reproduce:
- Send a stick/persistant notification to the phone, I did this through Developer Tools, could be done through a script pretty easily though.
service: notify.mobile_app_alex_phone
data:
message: test this will not clear
data:
persistent: true
tag: test0
sticky: true
- Send 3 more notifications to the phone without clearing any of them.
service: notify.mobile_app_alex_phone
data:
message: test this will clear
data:
tag: test1
---
service: notify.mobile_app_alex_phone
data:
message: test this will also clear
data:
tag: test2
---
service: notify.mobile_app_alex_phone
data:
message: test this too shall clear
data:
tag: test3
- Swipe clear the last 3 notifications you sent
- Clear the persistent notification.
service: notify.mobile_app_alex_phone
data:
message: clear_notification
data:
tag: test0
expected behavior: The first notification clears
actual behavior: The notification does not clear.
Workaround: Force closing the app from the android settings page for it clears the notification.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs): If you feel I need to get logs, I should be able to get that sorted.
Screenshots:
Additional information:
I did some testing that suggests when the persistent message shows up doesn’t matter so much as long as there are 4 messages.
One thought on this, I noticed that 4 is the break point at which notifications are rolled up into channels, so it might be related to that?
Might be related to #1223 or #1238 ? But If I understand correctly those fixes were released in 2021.1.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I can reproduce this issue. I will make a PR to fix this 👍
Perfect, thanks! TBH, I probably should use that anyway!