I have two automations, one that send a notification my iPhone when I leave home with a button to run the goodbye routing. The second is to turn on a switch that runs the routine.
This is the first one and it fires the notification as expected.
alias: Send actionable notification when Mike is away
description: >-
This will send an actionable notification to Mike's iPhone when he leaves
home.
trigger:
- platform: geo_location
source: device_tracker.mike_s_iphone_12_mini_3
zone: zone.home
event: leave
condition: []
action:
- service: notify.mobile_app_mike_s_iphone_13
data:
message: Mike has left home, would you like to turn on away?
data:
actions:
- action: Away
title: Set Away
mode: single
Here is the second one and it turns on the switch as expected:
alias: Set Away from a Notification
description: This automation will set the house to away from a notification on iOS
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: Away
action:
- type: turn_on
device_id: 3c8bc33a8835ec2d3bd41faf422c38ca
entity_id: switch.good_bye_routine
domain: switch
mode: single
The issue that I am having is that the first automation isn’t triggering the second. I’ve read the docs and think I am passing the event data as action: Away but something is wrong.