I used that article a bit when I first did my actionable notifications. I ended up relying on node red and never looked back. I personally think it made things easier for me.
So there are two things to this. You have to send the notification with an actionable item, then handle its return request. Usually two separate automation’s.
For sending the notification, that is easy, in the automation for action type use call service select your service, (notify whatever). The JSON portion (service data) is where the magic happens. Luckily, I can just rip my JSON from node red entries.
Here is an example I use to notify and include sensor data. You can put this in the service data field. { "title": "Morning Commute - Update", "message": "To work is: {{ states.sensor.home_to_work.state }} minutes via {{states.sensor.home_to_work.attributes.route}}", "data": { "actions": [ { "action": "test", "title": "Check drive time?" } ] } }
This would prompt the notification with data, and a button to check drive time again. I then handle this action and a new notification is sent out.
Looking in the GUI, your trigger type of event would be the one that handles it. The event you are looking for is this: html5_notification.clicked (ensure in front of clicked you use a period) I use Ariela so its slightly different.
The event data would like be something like: { "event_data": [ { "action": "test" } ] }
I did a quick test and it worked without an issue. Perform whatever action you would like from there.