clear_notification command not working when several notifications are shown
See original GitHub issueHome Assistant Android version: 2021.3.1-full
Android version: 11
Phone model: Oppo Find X2 Pro (ColorOS 11) Xiaomi Mi 9 (MIUI 12.0.4)
Home Assistant version: core-2021.3.2 Python 3.9 virtual env
Last working Home Assistant release (if known): None
Description of problem: I’m using an automation that notify user’s mobile apps that some windows are opened. When the window is closed, the notification is cleared on all the mobile apps. It works perfectly when a single window is opened and closed. But when two windows are opened, it creates two notifications, and when the windows are closed, only one notification is cleared, the second one remains on the phones until manually dismissed.
I made the automation below to reproduce the issue. One notification is created, and cleared after 5 seconds, then a second notification is created with a different tag, and then cleared after 5 seconds. Then the first notification is created again ; 5 seconds later the second notification is created ; 5 seconds later the first notification is successfully cleared, but 5 seconds later the second notification is not cleared as expected .
`alias: Notifications Test description: Creates and clear one or multiple notifications on mobile app trigger: [] condition: [] action:
- service: notify.notify data: title: Test notification message: Create notification 1 data: ttl: 0 priority: high tag: tag_one color: yellow
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: clear_notification data: ttl: 0 priority: high tag: tag_one color: yellow
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: Create notification 2 data: ttl: 0 priority: high tag: tag_two color: green
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: clear_notification data: ttl: 0 priority: high tag: tag_two color: green
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: Create notification 1 data: ttl: 0 priority: high tag: tag_one color: yellow
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: Create notification 2 data: ttl: 0 priority: high tag: tag_two color: green
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: clear_notification data: ttl: 0 priority: high tag: tag_one color: yellow
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: notify.notify data: title: Test notification message: clear_notification data: ttl: 0 priority: high tag: tag_two color: green mode: parallel max: 10 `
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
[logcat_03-16-2021_09-04-02.txt](https://github.com/home-assistant/android/files/6147050/logcat_03-16-2021_09-04-02.txt)
Screenshot of problem:
Additional information:
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (15 by maintainers)
Top GitHub Comments
I could reproduce this issue and fixed it in the PR #1452
Thanks @ScratMan for the logs and testing 👍
Hi, here is a new log with the beta. I could reproduce the issue the same way. [ logcat_03-24-2021_21-16-40.txt ](url)