Hey all,
I’m hoping this will help someone, because this took hours to figure out. It really should not be that hard for a newbie I was just lucky I found this legends blog with all the info on it.
FYI, im very new to HA, so I doubt I could really help if you have questions, but ill give it a go LOL
Also, hopefully this goes without saying, but you need to have Alexa Media Player installed and working
Calling Alexa routines from Home Assistant
I have been trying to find a simple way to have Home Assistant start and stop the internet radio station Radio Paradise on all my Alexa speakers in the house. I have a couple of Echo dots and Echo …
- create the Alexa routines
- create the scripts (I just pasted these directly into the scripts.yaml and edited to what I needed)
radioparadise:
alias: Play Radio Paradise
icon: "mdi:play"
sequence:
- service: media_player.play_media
data:
media_content_id: Radio Paradise
media_content_type: routine
entity_id: media_player.den_echo_dot
mode: single
stopmusic:
alias: Stop playing music on Alexa
icon: "mdi:stop"
sequence:
- service: media_player.play_media
data:
media_content_id: stop playing music
media_content_type: routine
entity_id: media_player.den_echo_dot
mode: single
- Put the following in your configuration.yaml
homeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages # package setup
- Create a “customize.yaml” in the HA config folder and add this code block (edit for your own context)
script.radioparadise:
friendly_name: Start Playing
icon: mdi:play
script.stopmusic:
friendly_name: Stop Playing
icon: mdi:stop
- I also created a lovelace card to test it out, but up to you
Copy to clipboard
entities:
- action_name: Play
entity: script.radioparadise
- action_name: Stop
entity: script.stopmusic
show_header_toggle: false
title: Radio Paradise
type: entities