I’m using actionable notifications in an automation as a daily medicine reminder (borrowed heavily from a Blueprint shared here).
I’m presenting the actions of “Taken”, “Remind”, and “Skip”. This works perfectly fine if I choose one of the actions from my iPhone. However, when I choose on of the actions from my Apple Watch, HA never seems to get the response.
HA version 2021.6.4, Companion App version 2021.6, iOS 14.6, WatchOS 7.5.
Here is the relevant code from my automation:
action:
- service: input_boolean.turn_on
target:
entity_id: !input input_boolean
- alias: "Send Notification Until Taken or Skipped"
repeat:
while:
- condition: state
entity_id: !input input_boolean
state: "on"
sequence:
- alias: "Log that we are sending initial med reminder"
service: logbook.log
data:
name: !input notification_title
message: !input logbook_message_remind
entity_id: !input input_boolean
- alias: "Send the mobile notification and ask for response"
device_id: !input notify_device
domain: mobile_app
type: notify
title: !input notification_title
message: !input notification_message
data:
actions:
- action: "TAKEN"
title: !input notification_action_taken
- action: "LATER"
title: !input notification_action_later
- action: "SKIP"
title: !input notification_action_skip
- alias: "Wait for a response"
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "TAKEN"
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "LATER"
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "SKIP"
timeout:
minutes: !input ask_later_wait_time
- alias: "Perform the action"
choose:
- conditions: "{{ wait.trigger.event.data.action == 'TAKEN' }}"
sequence:
- service: input_boolean.turn_off
target:
entity_id: !input input_boolean
- service: logbook.log
data:
name: !input notification_title
message: !input logbook_message_taken
entity_id: !input input_boolean
- conditions: "{{ wait.trigger.event.data.action == 'LATER' }}"
sequence:
- service: logbook.log
data:
name: !input notification_title
message: !input logbook_message_later
entity_id: !input input_boolean
- delay:
minutes: !input ask_later_wait_time
- conditions: "{{ wait.trigger.event.data.action == 'SKIP' }}"
sequence:
- service: input_boolean.turn_off
target:
entity_id: !input input_boolean
- service: logbook.log
data:
name: !input notification_title
message: !input logbook_message_skip
entity_id: !input input_boolean