Quite confused from the docs about actionable notifications on Android?

I’m building a notification up in Node-Red, the ‘normal’ notification works perfectly.
But as enough is never enough, I want to add an action to the notification.

{
   "message": "Røgalarmen {{ flow.location  }} er aktiveret",
   "title": "Røg {{ flow.location  }}",
   "data": {
        "tag": "brandalarm",
        "color": "#FF0000",
        "channel": "alarm_stream",
        "importance": "high",
        "ttl": 0,
        "priority": "high",
        "actions":
          - "action": "Turn_Off_Firealarm",
            "title": "Sluk Brandalarm"
   }
}

Without the ‘actions’ section it works perfectly, but with it I get the usual “Call-service error. extra keys not allowed @ data[‘0’]”

What am I doing wrong here?

That’s not JSON. Or yaml for that matter, it’s a strange blend of the two. Change to this:

        "actions": [{
            "action": "Turn_Off_Firealarm",
            "title": "Sluk Brandalarm"
        }]
2 Likes

Thanks @CentralCommand that worked perfectly!