I’m using mini-media-player
(https://github.com/kalkih/mini-media-player) in HA and with this add-on it’s also possible to add shortcuts/buttons below the player. I’ve managed to add a button to play a specific Spotify list, I’m now trying to add a button to start playing a specific radio station via TuneIn (on my Alexa Echo Dot).
Here’s the card configuration:
type: 'custom:mini-media-player'
entity: media_player.echo_dot
icon: 'mdi:amazon-alexa'
hide:
source: true
power_state: false
shuffle: false
info: short
shortcuts:
columns: 2
buttons:
- icon: 'mdi:radio'
name: Radio
type: script
id: script.alexa_radio
- icon: 'mdi:spotify'
name: Spotify
type: script
id: script.alexa_spotify
And the script.alexa_radio
that I’ve set up:
sequence:
- service: media_player.play_media
entity_id: media_player.echo_dot
data:
media_content_id: >-
http://playerservices.streamtheworld.com/api/livestream-redirect/WILLY.mp3
media_content_type: audio/mp4
mode: single
icon: 'mdi:radio'
I’ve followed these steps to find the media_content_id
.
Any ideas? When I execute the script it doesn’t actually do anything.