Like the app notify I’d like for the sidebar persistent notifications to have the option for buttons other than the default “Dismiss” button.
For example, I have an automation that creates a notification that runs 2 months after I’ve changed the Air Conditioner filters. I’d like to have a button that says “This has been done” that could run a script that would update the date helper.
I use this for a few things, like the pool filter/chlorine, etc. If buttons could be configured I’d use it for more things like “It’s trash day!”.
These are items that I don’t really need to be sent to my phone to take care of immediately, but are very well suited for the sidebar notifications as they are not time critical.
Yes please! Bring actions to persistent notifications, would use it all the time.
I’m really hoping someday that persistent notifications work just like companion app notifications, same features and identical service. But doesn’t seem like there’s much appetite for that, probably cause the mobile apps do a great job.
Can this not already be done in a roundabout way via a HTML link? I didn’t look too hard for a direct link to service call… but surely that is possible vi the api.
service: persistent_notification.create
data:
message: >-
**There is** <i> an update in </i> [click
this!](http://homeassistant.local:8123/config/devices/device/4aa7957bb1937fe6413de6cc5e496a0d)
**it will take you here
http://homeassistant.local:8123/config/devices/device/4aa7957bb1937fe6413de6cc5e496a0d**
title: Update message
that link only works while you’re on your LAN. You have to pick either internal or external domain. Unlike mobile app actions where you just provide a relative path and it handles the domain for you
you can’t trigger automations by clicking a link. Idk about the author but for me, that’s mainly what I want. Most notifications I send to my phone have actions that trigger automations, that’s what I want for persistent notifications
EDIT:
Didnt see this. No, this is impossible. The entire API requires authentication and the auth header isn’t provided when you click a link. Also calling a service is a POST call and clicking a link makes a GET call.
The only exception to the auth rule is webhooks. Webhook urls made by automation triggers do not require auth. However you must make a POST request and clicking a link does a GET so that won’t work either.
Ah yeah, I was thinking along the lines of a link to a button to trigger an automation.
Which does sort of work except for as you say the relative path. It spawns in the window you are in if you on the right connection.
Plus you would have make a dashboard view per button pretty much.
Doable in the meantime I guess. Although it would be two clicks and having to pick your internal or external link.
Anyway it was only as messy workaround solution. Although at that point it would probably make more sense to use the app version.
If you only specify the path in the URL, then it will pick up the current host, so you only need one link. I have a similar thing for when there are HACS updates -