I am trying to create a script to notify a mobile phone when the alarm is triggered, this script takes a message variable from the calling automation and has two options 1. to disable the alarm and 2. to look at the cameras. Both of which lead to lovelace pages.
I am getting an error: “Actions: extra keys not allowed @ data[0][‘variables’]”
Can anyone spot the mistake and suggest corrections please? Thank you!
mobile_new_notify:
alias: Mobile Notify me
description: announcements to my mobile
sequence:
variables:
action_1: '{{ ''1_'' ~ context.id }}'
action_2: '{{ ''2_'' ~ context.id }}'
service: notify.mobile_app_x_phone
data:
message: '{{ message }}'
data:
actions:
- action: '{{ action_1 }}'
title: Disable Alarm
- action: '{{ action_2 }}'
title: View Cameras
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_1 }}'
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_2 }}'
choose:
- conditions: '{{ wait.trigger.event.data.action == action_1 }}'
sequence:
- action: URI
title: View More
uri: /dashboard-sec/Security
- conditions: '{{ wait.trigger.event.data.action == action_2 }}'
sequence:
- action: URI
title: View More
uri: /lovelace-test/cameras