As the title states, is this currently possible? I am trying to create a reusable actionable notification for general dismiss/confirm stuff. It currently look like this:
confirm_dismiss_notification:
mode: restart
sequence:
- variables:
action_confirm: "{{ 'CONFIRM_' ~ context.id }}"
action_dismiss: "{{ 'DISMISS_' ~ context.id }}"
clear_notification:
- action: notify.home
data:
message: "clear_notification"
data:
tag: "{{ tag }}"
- action: notify.home
data:
title: "{{ title }}"
message: "{{ message }}"
data:
tag: "{{ tag }}"
actions:
- action: "{{ action_confirm }}"
title: Yes
- action: "{{ action_dismiss }}"
title: No
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_confirm }}"
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_dismiss }}"
- choose:
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
sequence: "{{ confirm_sequence + clear_notification }}"
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
sequence: "{{ dismiss_sequence }}"
Seems reasonable to me except I get this error:
ERROR:homeassistant.components.script:Script with object id 'confirm_dismiss_notification' could not be validated and has been disabled: expected dictionary @ data['sequence'][3]['choose'][0]['sequence'][0]. Got '{'
Which makes me wonder if this is currently possible or that I am messing up somewhere. Has anyone tried this before?