Lovelace: Mini Media Player

I have 2 questions:

1
Can I use !include filename.yaml with my buttons, so I can repeat the same buttons for the six players I got? Something akin to this:

Lovelace:

    card:
      type: custom:mini-media-player
      entity: media_player.living_room
      shortcuts: 
        buttons: !include filename.yaml
        columns: 2

filename.yaml

- icon: mdi:star
  id: Starred
  name: Starred
  type: source
- icon: mdi:numeric-6-box-multiple-outline
  id: DR P6 BEAT
  name: P6 Beat
  type: source

2
Is it possible when calling a script from a button, that you can make it repeatable for multiple speakers?
The reasoning is that I want Spotify playlists to start shuffled, and I can see there are multiple ways to achieve this, but they all requires you to target a specific speaker.

hi, i have volumio integrated with home assistant, the mini player works fine except for the part of the show_progress, it does not work with it, if i show DLNA player entity, the show_progress works fine

Since a while (could be more than a year), I donā€™t have the dropdown for my sonos-favorites anymore.
image
It was always something like thisā€¦

Did something change?

The integration changed behaviour quite a few months back. So now you canā€™t select favourites that way.

The workaround is to create shortcuts with your favourites instead.
image

hide_when_off:
is not working for me anymore. same for others?

Anyone knows how to fix the drop-down? It stays always expanded.
image

Iā€™m trying to keep a minimalistic look to my lovelace views, with a standardised colour palette.

Is there anyway to use something like the Material artwork option, but keeping the left/mid side a standard colour, as well as all the text/icons, ideally off the theme, and then the artwork showing on the right hand side?

I just find the change in colours sometimes jarring, when compared to the rest of the screen.

Thanks!

Hi there!

Iā€™m trying to create a card, wich helps me to controll my sonos speakers grouping and volume. And Iā€™m stuck :).

The problem is: usually my family starts any music randomly on our 4 speakers. If the music is not playing on the ā€œmain entityā€, the mini media player card do not let me to controll volume or grouping.

This is my code:

type: custom:mini-media-player
entity: media_player.sonos_nappali
volume_stateless: false
name: Sonos
source: full
artwork: cover
info: short
hide:
  power: true
  icon: true
  source: true
speaker_group:
  platform: sonos
  supports_master: false
  show_group_count: true
  expanded: true
  sync_volume: true
  entities:
    - entity_id: media_player.sonos_konyha
      name: Konyha
    - entity_id: media_player.sonos_terasz_szoba
      name: Terasz
    - entity_id: media_player.sonos_move
      name: Move

This is the screenshot if I start to play music on konyha (via my phone):
image

And this is if nappali (the main entity) is included:
image

Any idea how manage my speakers if the main entity is not playing?

I have cards for each speaker, and let them hide if they are grouped, but not being the master.

1 Like

this is a good solution, but it would be nicer if Iā€™d be able to switch even master.
With custom sonos card you can manage the groups easily, but that card is too much for meā€¦ I need a simple solution.

I think you are out of luck with the mini media player then.

yeah, it seems like :).
Any other idea?

Is it possible to display the artwork of Apps on a ROKU player? Netflix, Hulu, Disney for example. Right now it just shows the picture of the App logo.

Plex server works great, if I target that direectly for displaying the movie artwork. But wondering if itā€™s possible to do with ROKU in general

I currently have a background set (a simple musical note), so that if my Sonos doesnā€™t have artwork (which sometimes happens when using alexa), or is not in use, there is something showing.

My Sonos setup includes an Arc soundbar, and when the TV is playing, it shows ā€œTVā€ as the Sourceā€¦ as per the below screenshot.

What I would like to setup, is that the background changes to a different graphic (showing a TV icon) when the TV is the source.

Therefore, does anyone know if it would be possible to write some code which changed the background to another graphic when the source is set to ā€œTVā€? Anything I try doesnā€™t seem to work.

Thanks!

My Current code:

type: custom:mini-media-player
entity: media_player.kitchen
group: false
volume_stateless: false
toggle_power: true
artwork: material
source: icon
sound_mode: icon
info: scroll
speaker_group:
  platform: sonos
  show_group_count: false
  sync_volume: true
  icon: mdi:speaker-wireless
  entities:
    - entity_id: media_player.kitchen
      name: Sonos Kitchen
    - entity_id: media_player.living_area
      name: Sonos Living Area
hide:
  power: true
  icon: true
  name: true
  source: true
scale: '1.5'
style: |
  ha-card {
    height: 207px;
  }
background: /local/images/music-mini.png

Is it possible to make a shortcut that navigates to a different view?
The button for the shortcut is not a problem, the problem is to get it to navigate a different view
card

I tried with this code for the shortcut

- icon: mdi:spotify
      name: Media Center
      tap_action:
        action: navigate
        navigation_path: media

But I only get en error, anybody have an idea how to fix it?

All my code for the card

type: custom:mini-media-player
entity: media_player.spotify_chris
group: false
volume_stateless: false
artwork: cover
source: icon
hide:
  volume: false
  icon: true
  power: true
  source: true
  progress: false
  shuffle: true
shortcuts:
  columns: 3
  buttons:
    - icon: mdi:music
      name: Radio VLR
      type: script
      id: script.play_radio_vlr_radio
    - icon: mdi:music
      name: MyRock
      type: script
      id: script.play_myrock_radio
    - icon: mdi:music
      name: Classic Rock
      type: script
      id: script.play_classic_rock_radio
    - icon: mdi:spotify
      name: AC/DC
      type: script
      id: script.play_ac_dc_playlist_on_spotify
    - icon: mdi:spotify
      name: Battle Beast
      type: script
      id: script.play_battle_beast_playlist_on_spotify
    - icon: mdi:spotify
      name: 2021
      type: script
      id: script.play_2021_playlist_on_spotify
    - icon: mdi:spotify
      name: Media Center
      tap_action:
        action: navigate
        navigation_path: media
info: short
name: Musik

1 Like

iā€™m looking to do exactly the same thing, and Iā€™d like to know if :

  • itā€™s possible
  • and if itā€™s possible to naviagte to a path on the left menuā€¦

I am not sure which page you are trying to navigate to, but if you are looking for the Media section down the left hand menu, try media-browser/media_player.spotify_chris

1 Like

Sorry it was not clearā€¦ Iā€™m, trying to navigate to a different view called media

Take a look in your browser when you navigate to that page, the path probably starts with lovelace

Thats a real shameā€¦

Would you mind sharing your code used to create the shortcuts to the favourites? Thanks!