question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications created by notify.persistent_notification can't be dismissed programmatically as they lack a notification_id

See original GitHub issue

The problem

The notification platform notify.persistent_notification doesn’t accept notification_id similar to how the service persistent_notification.create does. This means that you can not dismiss specific notifications reliably or at all via persistent_notification.dismiss which accepts a notification_id in order to know which notification to dismiss.

It also appears that no documentation was added for notify.persistent_notification.

In particular, I need this feature because I’m trying to use notify.persistent_notification with alert’s.

What version of Home Assistant Core has the issue?

core-2022.3.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Persistent Notification

Link to integration documentation on our website

https://www.home-assistant.io/integrations/persistent_notification/

Anything in the logs that might be useful for us?

When attempting to call the services with a notification_id:

Failed to call service notify.persistent_notification. extra keys not allowed @ data['notification_id']. Got None

Additional information

A relevant PR is https://github.com/home-assistant/core/pull/40638.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
KevinCathcartcommented, Jul 9, 2022

@KevinCathcart Thanks for taking a look at this. I saw you created #71842, but it looks like it was never reviewed. Just thought I’d follow up.

Yeah, it never got reviewed, because I had left it in draft pending writing documentation. Then I was busy for a while, including being on vacation, and it managed to get closed. I’ve done the documentation, and recreated the Pull request as #74822 now, this time not as a draft, so it should be ok this time.

0reactions
ScottG489commented, Oct 8, 2022

Thanks @KevinCathcart. Is there anything we can do to get more visibility on this? A few releases have come and gone and it’s been disappointing not having this. Maybe I can create a WTH on the forum as to why this PR hasn’t been merged 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why the heck is there no notify.persistent_notification service?
I guess the real question here is why doesn't persistent_notification leverage the notify platform like all other notification integrations?
Read more >
Android Notification intent to clear it self - Stack Overflow
The notification for my purposes will just plainly notify, nothing else. So what would be the code of an intent that just clear/cancel...
Read more >
Foreground services - Android Developers
You should only use a foreground service when your app needs to perform a task that ... On previous versions of Android, the...
Read more >
Understanding message delivery | Firebase Cloud Messaging
Enable delivery data export for alert notifications. Because only alert notifications can trigger notification service app extensions, you must add a ...
Read more >
Notifications in Android - Medium
Notification is a display message that we show outside of our app to users. ... launch or at least before you create notification...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found