Mini Media Player not showing artwork

I have followed the Smart Home Junkie video on setting up a Spotify player (and the Radio Player). However the mini media card is not showing the artwork when I play from Spotify (although the HA suggested media control card does show it). Secondly, I cannot get any radio stations to work. I am using Echos as speakers, and I am having all sorts of issues with them only being occasionally available, but that is for a separate discussion - I think. Can anyone see the error(s) in the following code please.

type: custom:mini-media-player
entity: media_player.master_bedroom_echo_dot
name: Master Bedroom Echo
icon: mdi:music
artwork: cover
source: full
sound_mode: full
info: scroll
background: /local/community/mini-media-player/spotify/radiobackground.jpg
shortcuts:
  columns: 3
  buttons:
    - name: Spotify Rock'N'Roll
      type: service
      id: spotcast.start
      data:
        device_name: Master Bedroom Echo Dot
        uri: spotify:playlist:04FQPy2qlfN865yzo3BzgL
        random_song: true
        shuffle: true
    - name: Spotify Party
      type: service
      id: spotcast.start
      data:
        device_name: Master Bedroom Echo Dot
        uri: spotify:playlist:6Yt6tgQmWnThGDQtWOyoWQ
        random_song: true
        shuffle: true
    - type: script
      name: Talksport Radio
      id: script.media_play_talksport
    - type: script
      name: BBC World Service from TuneIn
      id: script.bbc_world_service_from_tunein
    - type: script
      name: BBC Radio 1
      id: script.media_play_bbc_radio_1
    - type: script
      name: BBC Radio 2
      id: script.media_play_bbc_radio_2

And here is one of the scripts for the Radio

alias: "Media: Play BBC Radio 1"
sequence:
  - service: media_player.play_media
    data:
      media_content_id: media-source://radio_browser/d97b5842-8e9b-46cc-85f0-d2dff6738c7c
      media_content_type: music
      enqueue: replace
    target:
      entity_id: media_player.master_bedroom_echo_dot
mode: single
icon: mdi:play

Can’t tell if your code is okay, but I can’t get the radio station running with it.

After I’ve tried different approaches which were more or less working, I ended up by using the spotify-card with the spotify integration and spotcast and for playing radio stations by some drop-down lists (helpers, for radio stations and echos) and a script, which all works pretty well.


what you see: playing Spotify in the shower and BBC Radio 1 in the office.

Since a couple of weeks the information in mini-media-player (artwork, songtitles, etc) is not always updated automatically and I have to reload the alexa integration and even than it still shows the artwork of the kitchen device despite its not playing anymore.

Hi Joerg
Thank you so much for helping.
Would you mind posting your code here for me to follow ?

Try TUNEIN for radio

Thank you
Brilliant - that works.
How do I find the specific Tunein radio stations for the scripts ?
BBC Radio 1 and 2 both work, as does Talksport, but not BBC World Service. I simply used
play BBC-World-Service

Play BBC-World-Service-News

Google “tunein bbc world service” use the url name

afbeelding

Go to tunein and search for the radio station you want. Use it excatly as it’s written there, like all in upper-cases, mind hyphen, etc.

The script original is by @poudenes posted there → Echo Devices (Alexa) as Media Player - Testers Needed - #5501 by poudenes

Mind the different naming of my helpers.
For the dropdown-lists (helpers)

The script.
Note: it won’t work with Alexa groups, see the Alexa integration. If you have for example a stereo group (like I do, named officestereo) you have to call it on one of the devices of the group, here media_player.echo_office2

As you can see with the helper, I have a lot of radio stations configured, but I shortend the code of the script (media_content_id) in here to the last two entries.

alias: Stream Radio
icon: mdi:play
description: >-
  Radio - Here all channels can be selected and turn them on or off on Tablet or
  Alexa
sequence:
  - service: media_player.play_media
    data:
      entity_id: >-
        {% if is_state('input_select.helpers_echo_selector', 'Office') %}
        media_player.echo_office2 {% elif
        is_state('input_select.helpers_echo_selector', 'Shower') %}
        media_player.echo_shower {% elif
        is_state('input_select.helpers_echo_selector', 'Living') %}
        media_player.echo_wohnen1 {% elif
        is_state('input_select.helpers_echo_selector', 'Kitchen') %}
        media_player.echo_kitchen {% endif %}

      media_content_id: >-
        {% if is_state('input_select.helpers_radio_station', 'Ibiza Live
        Radio') and states('input_select.helpers_echo_selector') in ['Office',
        'Shower', 'Kitchen', 'Living'] %} 
          Ibiza Live Radio
        {% elif is_state('input_select.helpers_radio_station', 'BBC Radio 1')
        and states('input_select.helpers_echo_selector') in ['Office', 'Shower',
        'Kitchen', 'Living'] %} 
          BBC Radio 1

        {% endif %}

      media_content_type: >-
        {% if is_state('input_select.helpers_echo_selector', 'other') %}
        audio/mp3 {% elif states('input_select.helpers_echo_selector') in
        ['Office', 'Shower', 'Kitchen', 'Living'] %} TUNEIN {% endif %}


Note: poudenes uses custom as media_conten_type.
I found using TUNEIN is more reliable.

The card:

type: vertical-stack
title: Station & Echo Selector
cards:
  - type: entities
    entities:
      - entity: input_select.helpers_echo_selector
      - entity: input_select.helpers_radio_station
      - entity: script.stream_radio
        icon: mdi:play
        secondary_info: none
        name: Start selection
    theme: midnight
    title: null

Edit:
I corrected the script as it was corrupted by clipping the radio stations.

1 Like

Thank you both - more than I could have hoped for.