Me: Alexa, I bought coffee filters
Alexa: How many coffee filters did you buy?
Me: 100
The default actionable notification script:
alias: Activate Alexa Actionable Notification
sequence:
- service: input_text.set_value
data:
entity_id: input_text.alexa_actionable_notification
value: '{"text": "{{ text }}", "event": "{{ event_id }}"}'
- service: media_player.play_media
data:
media_content_type: skill
media_content_id: amzn1.ask.skill.6b2071e3-0f30-4fcf-b3d3-xxxxxxxxxxxx
entity_id: '{{ alexa_device }}'
mode: single
description: Activates an actionable notification on a specific echo device
fields:
text:
description: The text you would like alexa to speak.
example: What would you like the thermostat set to?
event_id:
description: Correlation ID for event responses
example: ask_for_temperature
alexa_device:
description: Alexa device you want to trigger
example: media_player.new_white_echo_dot
Alexa routine:
Name: I bought Coffee Filters
When You Say: Alexa, I bought coffee filters
Alexa Will: SCENE: Alexa I bought Coffee Filters
HA script triggered:
alias: Alexa - I Bought Coffee Filters
sequence:
- service: script.activate_alexa_actionable_notification
data_template:
text: How many coffee filters did you buy?
event_id: actionable_notification_coffee_filters
alexa_device: '{{ states.sensor.last_alexa.state }}'
mode: single
Automation routine:
alias: Actionable Notification - I Bought Coffee Filters
description: ''
trigger:
- platform: event
event_type: alexa_actionable_notification
event_data:
event_id: actionable_notification_coffee_filters
condition: []
action:
- service: input_number.set_value
entity_id: input_number.coffee_filter_count
data_template:
value: >-
{{ trigger.event.data.event_response|int +
states('input_number.coffee_filter_count')|int}}
mode: single