Hello!
We want to get started with Actionable Notifications on iOS but are unable so far.
We are using the Companion Docs as a starting point
All the below code is based on the Companion App docs but we are probably making some newbie mistakes?
We can send notifications but not with a url /uri link or with any embedded actionable buttons.
Have searched this forum but found no examples that work for us. If there is, would appreciate a link.
I an ideal world, we want a persistant notification on the ios app that also has actionable buttons.
This is the source for all code below:
This automation is working, but we are so far unable to add any actionables to it.
If we can get this working, we want to try and building notification action scripts
as in the examples at the last part of that Companion Doc page.
alias: TEST example without url or actionables
description: test example
triggers:
- trigger: state
entity_id:
- switch.gx_device_relay_1_state_2
conditions: []
actions:
- action: notify.send_message
target:
entity_id:
- notify.my_iphone
- notify.my_laptop
data:
title: Battery low
message: Emergency switch activated. Power is off.
mode: single
Below are some functions we want to add, from the same Companion Docs.
However we try to add them we get errors and mostly:
extra keys not allowed @ data['actions']. Got None
We are struggling with this. Grateful for any links or clear working examples.
Many thanks!
actions:
- action: "ALARM" # The key you are sending for the event
title: "Sound Alarm" # The button title
- action: "URI" # Must be set to URI if you plan to use a URI
title: Open Url
uri: /dashboard-alarms/0 #URL to open when action is selected, can also be a lovelace view/dashboard
- action: "URI"
title: "Call Pizza Hut"
uri: "deep-link://tel:2125551212"