Alexa Whole Home Music from Dashboard

I have the following Script and Dashboard that allows for playing preset stations/playlist from any music service on an alexa group. It works well and I would like to credit others for providing samples that I have gathered to get to this point. I use the MiniMedia Player component and Alexa media Player integration. Again it works well…
However what I dont like is occasionally it needs to use Alexa to prompt me if this is really what I want to play and so for that I have to issue the command to a particular Alexa. (office_echo).

What I would prefer is that the computer, fire tablet( 2 of them), or phone in which the station preset button is pressed receive the prompt from alexa asking me something like “Should I play the Playlist Mellow 70’s gold?” or “Was that John Denver Radio?”. I am not always starting the music within ear shot of the office echo so If i don’t answer the alexa prompt, no music plays. This appears to be dependent on the station I am playing.
So eithger no prompt at all or a prompt that is audible on the calling device computer, tablet or phone.

Don’t judge he music :slight_smile:

Here is one Script


alias: Play Entire House Music
sequence:

  • service: media_player.play_media
    data:
    entity_id: media_player.office_echo
    media_content_id: play {{name_of_music}} on the {{group_name}} group
    media_content_type: custom
    mode: single
    icon: mdi:music

Dashboard

type: custom:mini-media-player
entity: media_player.entire_house
source: full
volume_step: ‘1’
toggle_power: true
group: false
hide:
play_stop: false
shuffle: false
shortcuts:
columns: 4
buttons:
- name: 60s Hits
type: service
id: script.play_entire_house_music
data:
name_of_music: Hit Music 60s From Amazon Music
group_name: Entire House Group
- name: 70’s Rock
type: service
id: script.play_entire_house_music
data:
name_of_music: 70s Rock From Amazon Music
group_name: Entire House Group
- name: 80’s Rock
type: service
id: script.play_entire_house_music
data:
name_of_music: 80s Rock From Amazon Music
group_name: Entire House Group
- name: 90’s Rock
type: service
id: script.play_entire_house_music
data:
name_of_music: 90s Rock From Amazon Music
group_name: Entire House Group
- name: Current Rock
type: service
id: script.play_entire_house_music
data:
name_of_music: All Hits From Amazon Music
group_name: Entire House Group
- name: Classical
type: service
id: script.play_entire_house_music
data:
name_of_music: Classical For Studying From Amazon Music
group_name: Entire House Group
- name: John Denver
type: service
id: script.play_entire_house_music
data:
name_of_music: John Denver From Amazon Music
group_name: Entire House Group
- name: Country Heat
type: service
id: script.play_entire_house_music
data:
name_of_music: Country Heat From Amazon Music
group_name: Entire House Group
- name: Texas Forever
type: service
id: script.play_entire_house_music
data:
name_of_music: Texas Forever From Amazon Music
group_name: Entire House Group
- name: 90s Alternative
type: service
id: script.play_entire_house_music
data:
name_of_music: 90s Alternative From Amazon Music
group_name: Entire House Group
- name: Modern Country
type: service
id: script.play_entire_house_music
data:
name_of_music: Relaxing Modern Country From Amazon Music
group_name: Entire House Group
- name: 50 Great R&B Slow Jams
type: service
id: script.play_entire_house_music
data:
name_of_music: 50 Great R&B Slow Jams From Amazon Music
group_name: Entire House Group
- name: Classic Rock Dinner Party
type: service
id: script.play_entire_house_music
data:
name_of_music: Classic Rock Dinner Party From Amazon Music
group_name: Entire House Group
- name: Mellow 70s Gold
type: service
id: script.play_entire_house_music
data:
name_of_music: Mellow 70s Gold From Amazon Music
group_name: Entire House Group
artwork: full-cover
volume_stateless: false

1 Like

@mkuhnke does this script play an Amazon music playlist?

Sure, just change the text to something like “Pig Roast Playlist From Amazon Music” where Pig Roast is the name of your playlist

@mkuhnke, Thank you for sharing the yaml for the script and dashboard. Could you kindly edit the post and format the yaml code with correct indentations, it would help beginners a lot. :slightly_smiling_face:

1 Like

I wish I could make this work.

1 Like

Using this and another example I got it working nicely using this script (added to your scripts.yaml file)

echo_music_everywhere:
  alias: Play Entire House Music
  sequence:
  - service: media_player.play_media
    data:
      entity_id: media_player.living_room
      media_content_id: play {{name_of_music}} on the {{group_name}} group
      media_content_type: AMAZON_MUSIC
  mode: single
  icon: mdi:music

My media_content_type is AMAZON_MUSIC as that’s my primary music source.

I’m using this for the card

type: custom:mini-media-player
entity: media_player.living_room
icon: mdi:amazon
artwork: cover
shortcuts:
  columns: 1
  buttons:
    - icon: mdi:pine-tree
      name: Carols Playlist Everywhere
      type: service
      id: script.echo_music_everywhere
      data:
        name_of_music: my playlist christmas
        group_name: everywhere
sound_mode: icon

Hope this helps you. You can obviously add more buttons. having name_of_music as “my playlist christmas” will force it to to play my own playlist called christmas, not one made up by Amazon. It could equally say “christmas music” and that would play whatever Amazon wanted you to listen to. You’d probably hate it :slight_smile: