-
-
Notifications
You must be signed in to change notification settings - Fork 187
Home Assistant Talking to Alexa (The Script)
You have created a Custom Skill. Have the ID of the skill at hand. You can find this on the Alexa Developer Console by clicking "Copy Skill ID" on the skill you created.
The following steps and examples are using this script to connect to Alexa. Make sure to install it i.e. into /config/scripts.yaml
. Replace <Your Skill ID>
with your skills ID.
script:
activate_alexa_actionable_notification:
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.bedroom_echo'
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: <Your Skill ID>
target:
entity_id: "{{ alexa_device }}"
Use the Developer Tools
to reload scripts.
Head to the next step: Hello world
If you get an error with the skills response:
For the URL make sure you are using an external URL and not your personal internal IP that you use to access the HA dashboard.
Make sure you setup port forwarding to let HA communicate to outside your firewall.
Go to this video and watch how to port forward, create a URL, and setup the DNS in Home Assistant. https://www.youtube.com/watch?v=jkBcGl7Vq8s