After doing some research, I haven’t found an answer yet, so thought to ask the community.
I want to use actionable notifications, which is so far all good and fine, it works mostly.
1 action I define in the notification is to open an app, via action: URI
But, at the same time I want to take this action and process further in HA to run an automation, in my case to turn off a toggle helper.
In my case it’s a reminder and when I open the app on the smartphone I want to use this “open app action” to also turn off the helper, meaning, I have done what was asked in the reminder.
When I try to listen to the action: URI, home assistant doesn’t fire any events at all I could use.
use a normal action to get the event back so you can automate things, you can still force the app to open stuff using an automation. There is no event sent back for URI action types and it probably won’t be possible given the various uses this feature has which would prevent it from sending back an event in certain situations. If you use the launch app notification command or even command activity you should be able to do what you are trying to do.
Thanks for the response. Took me now a while to see what you really meant. I was familiar with the command_activity, but I didn’t think of using action: whatever to then trigger another automation.
Maybe the following helps someone
What I ended up with is, having a script with a normal actionable notification, on my phone I now have 2 options, either “Done already” or “Open App”.
service: notify.mobile_app_phone
data:
message: Don't forget to review the HF order tonight.
title: Reminder HF
data:
actions:
- action: OPEN_HFRESH
title: Open HF App
- action: DONE_HFRESH
title: Already done
Open App then triggers the following automation to turn off the helper toggle and opening the app on the smartphone: