Lovelace: Mini Media Player

The single quotes are correct and text turn green when they are applied. Same used several other places and copy pasted as well, but as soon as I enter that instead of entity: media_player.sonos_bad I do loose the buttons…
This is full code:

entity: media_player.{{states('input_select.sonos_music_master_speaker') }}
type: custom:mini-media-player
hide:
  icon: true
  info: true
  power: true
  shuffle: true
  volume: true
  volume_level: true
  controls: true
  name: true
  source: false
icon: mdi:spotify
shortcuts:
  columns: 5
  column_height: 90
  buttons:
    - name: Alltid Nyheter
      type: source
      id: NRK Alltid Nyheter
    - name: NRJ Norge
      type: script
      id: script.media_play_nrj_norge
    - name: TH Likes
      type: script
      id: script.media_play_th_likes
    - name: TH Likes 2
      type: service
      id: spotify:user:xxxxxxx:playlist:xxxxxxxxxxxx
volume_stateless: false
info: scroll
source: full
group: false

Ahhh probably because you didn’t post the code correctly in the first one.

Paste that in the template editor under the developer tools. Does it look like you expect?

Hi guys,

I read a lot but unfortunately didn’t find this, my media player does not change the title to appear the name of the station radio, remains “default media receiver”, I’m using google nest… HA is on WM with windows.

any idea?

thx,
nick

image

I don’t think cast players support the media_title: attribute

Hello everyone,

I have read this topic and I have gained a lot of inspiration from it!

I’m having a problem with a card that I have build. It’s a card to start my favourite radio stations via a script on one of my Sonos speakers. It works, but it’s not visually pleasing. As you can see, there are still some borders and lines that I wish to hide. So I want to create a single card without borders with the information / scripts / volume sliders in it. I guess it is possible via media player card edit / card mods, but I don’t know how. Can anyone please help me?

This is the code that I have used:

cards:
  - cards:
      - entity: media_player.sonos_move_keuken
        type: media-control
        tap_action:
          action: more-info
      - entity: media_player.sonos_move_keuken
        hide:
          icon: true
          info: true
          mute: true
          power: true
          source: true
          volume: true
          name: true
          controls: true
        mini-media-player-progress-height: 1px
        progress: true
        shortcuts:
          buttons:
            - data:
                entity_id: script.new_script
              image: /local/SLAM-MM.png
              id: script.turn_on
              name: null
              type: service
            - data:
                entity_id: script.new_script_2
              image: /local/SLAM40!.png
              id: script.turn_on
              name: null
              type: service
            - data:
                entity_id: script.new_script_3
              image: /local/SLAM Hardstyle.png
              id: script.turn_on
              name: null
              type: service
            - data:
                entity_id: script.new_script_4
              image: /local/SLAMFM.png
              id: script.turn_on
              name: null
              type: service
            - data:
                entity_id: script.new_script_5
              image: /local/Radio 538.png
              id: script.turn_on
              name: null
              type: service
            - data:
                entity_id: script.new_script_6
              image: /local/Radio 538 DD.png
              id: script.turn_on
              name: null
              type: service
          columns: 3
        show_group_count: true
        show_progress: true
        type: custom:mini-media-player
        volume_stateless: true
      - entity: media_player.sonos_move_keuken
        hide:
          controls: true
          icon: true
          info: true
          max_volume: 100
          min_volume: 0
          name: hide
          play_pause: true
          power: true
          progress: true
          source: true
        type: custom:mini-media-player
    type: vertical-stack
mode: vertical
type: custom:stack-in-card

Thanks a lot!

Is there a way that an appleTV could be addressed to ? I use it together with some Sonos speakers and group them with AirPlay.

THX Bastian

Quick question. how can I move the volume buttons to the right margin here? Do I need card-mod or can I do it from within the .yaml?

cover: /local/SLAM-MM.png

sorry for the bump here, but since I am looking for a clean input text, what row do you use here?

I used the custom:text-input-row before but that uses Polymer which anytime soon will be deprecated Hope this is not that…?

Hi - thanks for all the great ideas and sharing in this forum!

I have an issue showing the source list in full.

With this configuration the current source isn’t showing, only the arrow

  - type: custom:mini-media-player
    entity: media_player.amplipi_source_1
    group: true
    name: 'Source:'
    hide:
      power: true
      info: true
      volume: true
      icon: true
      play_pause: true

no source

With the “volume: true” removed like this i can see the current source and arrow, but i want to hide the volume controls:

  - type: custom:mini-media-player
    entity: media_player.amplipi_source_1
    group: true
    name: 'Source:'
    hide:
      power: true
      info: true
      icon: true
      play_pause: true

with source

Thoughts?

Using Shortcut lists the, dropdown is not dynamic. When you choose from the list, the choosen shortcut id blank in the list. Could it be possible to hide the chosen one, alternativly give it a slightly different colour.

GREAT card BTW

How do I configure the card so that the control buttons are bigger? I don’t want to enlarge the entire card or all the elements in it – just the playback controls.

Thanks in advance.

Does anyone know if it’s possible to set a fallback image for when an entity does not provide any cover ? - Some of my sources don’t provide an image, but the resulting card looks weird when no image is present as I’m stacking with other cards… so just end up with a blank space and the progress bar…

Hi guys. First of all, thanks for great card @kalkih , I’m using it since few years ago. Finally I decided to automate little bit a music on my 6 Echo Dot devices, but found a problem. Not sure where could be root cause, HA, Amazon or Mini Media Player, so let’s try to ask here. To make thing simple, let’s forget 6 Echo devices, let’s focus on 2 Echo devices in living room.

Let’s say I have following devices:

  • media_player.alexa_living_room
  • media_player.alexa_living_room_2

Let’s say I made a speaker group (multiroom music) in Alexa app, which is exposed to Home Assistant:

  • media_player.living_room_area

I would like to have same Mini Media Player yaml for each of above 3 entities (with respective entity within yaml ofc), but this isn’t working for group. E.g. this is the yaml for single speaker media_player.alexa_living_room:

type: custom:mini-media-player
entity: media_player.alexa_living_room
artwork: cover
source: full
sound_mode: full
info: scroll
shortcuts:
  columns: 2
  buttons:
    - type: custom
      name: Rock Radio
      id: play ROCK Radio Beograd on tunein on Alexa Living Room
      icon: mdi:guitar-electric
    - type: custom
      name: BBC Radio 1
      id: play BBC Radio 1 on tunein on Alexa Living Room
      icon: mdi:guitar-electric
tts:
  platform: alexa
toggle_power: false

And this is the yaml for the speaker group media_player.living_room_area:

type: custom:mini-media-player
entity: media_player.living_room_area
artwork: cover
source: full
sound_mode: full
info: scroll
shortcuts:
  columns: 2
  buttons:
    - type: custom
      name: Rock Radio
      id: play ROCK Radio Beograd on tunein on Living Room Area
      icon: mdi:guitar-electric
    - type: custom
      name: BBC Radio 1
      id: play BBC Radio 1 on tunein on Living Room Area
      icon: mdi:guitar-electric
tts:
  platform: alexa
toggle_power: false

Single speaker card is fully working, but on group speaker card, buttons and TTS are not working. Nevertheless I’m not sure what does this mean, I can notice that Source is missing on speaker group card (top card is single speaker, bottom card is speaker group):

image

I found workaround. Buttons are working for group speaker if their command requesting a group speaker and if entity of Mini Media Player card is set to single speaker. Also (more than dirty) workaround for TTS is set multiple single speaker entities. Yeah, I know this is confusing, so below is full workaround yaml for working buttons and TTS for speaker group:

type: custom:mini-media-player
entity: media_player.alexa_kitchen
artwork: cover
source: full
sound_mode: full
info: scroll
shortcuts:
  columns: 2
  buttons:
    - type: custom
      name: Rock Radio
      id: play ROCK Radio Beograd on tunein on Living Room Area
      icon: mdi:guitar-electric
    - type: custom
      name: BBC Radio 1
      id: play BBC Radio 1 on tunein on Living Room Area
      icon: mdi:guitar-electric
tts:
  platform: alexa
  entity_id:
    - media_player.alexa_living_room
    - media_player.alexa_living_room_2
toggle_power: false

But this is little stupid, because this way I have no volume, pause, etc. controls for group, but for single device instead.

Sorry for long post, I am also open for proposes how this could be done different, maybe smarter way, thx.

Ok, so, replying to my self :grin:. I found custom:stack-in-card on github/HACS (same creator as for legendary custom:button-card). I like it, it can merge several different cards into one, as vertically, also horizontally, so you can have one border, etc. Below would be workaround. I am ok with this, now need to add more stations :laughing: (and maybe some styling for buttons if this is possible):

type: custom:stack-in-card
mode: vertical
title: Dnevna Soba
cards:
  - type: custom:mini-media-player
    entity: media_player.living_room_area
    artwork: material
    source: full
    sound_mode: full
    info: scroll
    icon: mdi:account-tie-voice
  - type: custom:mini-media-player
    entity: media_player.alexa_living_room
    hide:
      name: true
      icon: true
      info: true
      power: true
      source: true
      controls: true
      volume: true
    shortcuts:
      columns: 2
      buttons:
        - type: custom
          name: Rock Radio
          id: play ROCK Radio Beograd on tunein on Living Room Area
          icon: mdi:guitar-electric
        - type: custom
          name: BBC Radio 1
          id: play BBC Radio 1 on tunein on Living Room Area
          icon: mdi:guitar-electric
    tts:
      platform: alexa
      entity_id:
        - media_player.alexa_living_room
        - media_player.alexa_living_room_2

image

Is there anyone that can tell me how to place 2 dropdown lists for 1 entity?
I would like 1 for the radio stations and 1 for spotify playlists

Two issues:

  1. is it possible to have 1st row of shortcuts with 2 elements and 2nd row below with 4 elements?
  2. is it possible to call custom service (ie. switch.turn_on) of custom entity when pressing power button?

Can anyone please help to add a button to the mini media player that allows me to navigate to a different lovelace page? I tried to add the following button:

  - type: custom:mini-media-player
    entity: media_player.woonkamer_media
    artwork: cover
    volume_stateless: true
    group: false
    info: scroll
    hide:
      source: true
      progress: true
      mute: true
      prev: true
    shortcuts:
      columns: 5
      buttons:
        - name: false
          icon: mdi:plus
          type: navigate
          action:
            action: navigate
            navigation_path: /dashboard/mediaplayer

Also tried lots of different variants for instance: type: call-service / type: action etc.

And yes, I know how to add a different set of button cards underneath, but with the media player itself this should be possible according to the documentation, although its not that clear described unfortunately.

1 Like