Possible bug found with clearing app notifications (Android)

Hi together.

I think that I might have found a bug with clearing home assistant companion app notifications on Android. It would be great if someone could test it in their system. Here is my setup.

My Smartphone
Attribute Value
Model Google Pixel 8 Pro
Android Version 16
Home Assistant Companion App Version 2025.7.1-full
My Home Assistant Instance
Attribute Value
Install method Home Assistant OS
Core 2025.8.2
Supervisor 2025.08.1
Operating System 16.1
Frontend 20250811.0

Test Setup

Script 1 • Create Notifications

Code
sequence:
  - alias: Hallway Door opened
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: Hallway Door opened
      data:
        tag: HallwayDoorOpened
      title: Alarm
  - alias: Hallway Door closed
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: Hallway Door closed
      data:
        tag: HallwayDoorClosed
      title: Alarm
  - alias: Hallway Sensor detected motion
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: Hallway Sensor detected motion
      data:
        tag: HallwaySensorDetMot
      title: Alarm
alias: Create Notifications (TEST)
description: ""

Script 2 • Clear Notifications

Code
sequence:
  - alias: Hallway Door opened
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: clear_notification
      data:
        tag: HallwayDoorOpened
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - alias: Hallway Door closed
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: clear_notification
      data:
        tag: HallwayDoorClosed
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - alias: Hallway Sensor detected motion
    action: <insert your mobile device> # Example: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: clear_notification
      data:
        tag: HallwaySensorDetMot
alias: Clear Notifications (TEST)
description: ""

Behavior

First run Script 1.
This will create three notifications on your android device with three different tags.

Then run Script 2.
This script should then clear all three notifications. However, one notification always remains on the notification panel. I’ve posted a video which shows the behavior.

I really wonder if someone experiences the same issue. It’s pretty annoying…


Video

check the apps notification history to see if the notifications are received as expected. I would also check app logs to see if there was an error too.

I’ve been having a similar issue for the past month or two. I send multiple actionable notifications at the same time but whenever I ultimately click on them, the last one (the order I click them doesn’t matter) almost always fails to clear (but the action is always successful).

Edit: I should add I have been using the same automation for some time, but the issue of the last notification not clearing just started a month or two ago.

2 Likes

Seeing something similar here too. I have a “home alarm is armed” notification that is supposed to dismiss each morning when the alarm disarms, and a “washing machine done” notification that is supposed to clear when the washing machine lid is opened. Neither have been clearing consistently for the last month or so (although they do sometimes).

1 Like

Hi brooksben11

Thank you very much for your feedback!

I’ll probably make some additional tests and analyze the logs before I submit a bug report. But I’m pretty certain that it’s an issue within Home Assistant since more people experience a similar behavior.

Hi kg333. Thank you for your insights.

For me it happens everytime. I have a home alarm automation as well and the Test Setup from my initial post is actually a small snippet from it.

When I’m not at home, every motion sensor I have acts as a trap. If they register movement, I’ll get a notification with a “Dismiss Alarm” action button. When I press this button on the notification, the alarm system gets disarmed and sends a “clear_notification” message to my phone for every sensor that has detected movement.

Unfortunately, one notification always remains on the notification panel.

To make sure that the problem doesn’t lie in my automation, I simply built those two scripts. One sends the notifications and the other clears it.

I grabbed companion app logs the last time it happened, but it’s over 700 lines from the minute or two around then. Skimming and not knowing what I’m looking for, I see quite a few like this:

08-18 19:10:29.371 19410 19410 E mpanion.android: Invalid resource ID 0x00000000.

I’m happy to send the full log directly if that would be helpful. Obviously don’t want to post the entire thing as I don’t feel like going through 700+ lines making sure I’m not sharing something I shouldn’t. :slight_smile:

you should be able to see each notification data come in, I would start with looking at those to see if there is an error, also what did notification history look like?

Like when the notification is received? I’ll try to remember to open the logs next time they’re sent but I don’t THINK this is the issue, as the problem doesn’t seem to be tied to a given notification, rather it’s always the last one that’s acted upon that doesn’t clear. The order they are sent by HA/received by the phone nor which specific ones are acted upon, it’s always the last one clicked on that doesn’t clear (doesn’t seem to matter of I act on them all quickly or spread it out).

The notification history looks normal/fine (at least to me).

are you guys all on Android 16 by chance? If so what happens if you add the group parameter does it begin to behave as expected? Google made a lot of unexpected changes to how notifications are handled in Android 16 this maybe a consequence of that.

2 Likes

Yes I’m on Android 16. And sorry for the dumb question but what exactly do you mean by adding the group parameter? I couldn’t find any description about this parameter in the Home Assistant Companion Docs.

https://companion.home-assistant.io/docs/notifications/notifications-basic/#grouping

one change in android 16 was that after the second notification if there was no group set then all notifications from the app join a single group. I think this was part of the notification cooldown feature they added. Where once a notification is in that group, it stops making a sound. Only fix was to add your own group, I never noticed the bug because I always used groups to begin with as I dislike how android does the auto grouping of notifications.

grouping is when an item gets combined in the notification pull down menu, kinda like organization.

I’ve got a Pixel, so yes, I’m on 16 and the timing of things would seem to match when it dropped.

Honestly wasn’t aware of the group parameter (don’t know why, seems perfect for my use-case).

Just added it and tested it out; they all cleared. In my case at least, things worked like 5-10% of the time, so we’ll see if this is truly a fix or if I just got lucky this time.

1 Like

thanks for confirming! here the original reported issue, a bit different behavior but you can see how Groups impacted this https://github.com/home-assistant/android/issues/5428

we came to discover the platform bug which seems to be fixed and hopefully will be part of the next QPR release it sounds like

https://issuetracker.google.com/issues/424448500

not uncommon for things to break like this after an android release, thankfully this one got fixed pretty quickly. some dont get as lucky and become forever bugs

I’ll definitely test this out and give you feedback! Sounds promising so far. Just one question regarding this grouping mechanism:

When sending the clear_notification action, do I need to add the group parameter as well?

nope we only care about the tag and only process that, the OS doesnt need it either

You’re my hero! Works like a charm.

1 Like