How to use the Mini Media Player card in Home Assistant

Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.
Advertisement

This guide will introduce you to the popular Mini Media Player custom card for the Home Assistant Lovelace dashboard. In the following paragraphs, I will be showing you how to install, configure, and customize it. As with so many other custom cards for Home Assistant, this custom card does have many customization options, many of which I will cover.

Advertisement

The Mini Media Player custom card, for Home Assistant’s Lovelace dashboard, is one of the most popular custom components in the Community Store. Karl Kihlström is the developer of this popular alternative to the official Media Control Card, though as with most things Home Assistant, the community has been actively contributing to the project.

Table of content

How to install the Mini Media Player custom card for Home Assistant

You can manually install the Mini Media Player custom card, although I do not recommend this approach. The far better option is using the Home Assistant Community Store, or HACS for short. I won’t be detailing the approach in this guide, as the official website has that part covered. All you will need is a GitHub account and a bit of patience. Once install, adding a custom component is simply a matter of clicking a button.

Advertisement

With HACS set up, you can search for the Mini Media Player in the Frontend section, and install it. You will not have to restart Home Assistant to complete the installation. With Lovelace reloaded, you can get stuck in without any delay.

Configuring the Mini Media Player custom card

As the name suggests, the Mini Media Player made its name for being a more compact version of the Media Control Card. As can be seen in the comparison image, the Mini Media Player manages to offer more functionality, and yet it is roughly half the size. It pushes the progress bar to the bottom of the card and adds the undoubtedly more useful volume control in a prominent position.

Home Assistant's Mini Media Player custom card compared to the Media Control Card.
The default Media Control Card (top) and Mini Media Player (bottom)

Not everyone enjoys writing in YAML, and if you are one of those people, I have good news for you. The mini media player can largely be configured using the UI. Though, there are some advanced options you might be interested in, which are only available in the code editor. But fear not, even the code isn’t all too complex.

Advertisement
The setup options for the Mini Media Player custom card in Home Assistant
The many options of the Mini Media Player custom card for Home Assistant

Using the UI configurator, you can do the following:

  • You can customize the name of the speaker. The name is displayed above the currently playing track.
  • Using the icon field, you can change the default Chromecast icon to any Material Design Icon (e.g., mdi:bed).
  • The artwork dropdown has multiple options on how the artwork is presented. I will be covering these further down.
  • You can have the source displayed as an icon or text. The same goes for the sound mode.
  • The artist and track name can be kept short or scroll.
  • The mute button, seen next to the volume bar, can be replaced with one of many alternative options.
  • If you choose to show volume up and down buttons, instead of a bar, you can set the step of each click. You can also set a maximum and minimum volume.
  • Finally, you can set a static background and adjust the scale of the card.

Artwork options in the Mini Media Player compared

Below is a comparison of all the options for the artwork. For me, material and cover is the only two I consider. Using any of the other options, where the background overlaps the text, the text can become illegible if the background is too bright (see the cover-fit image for an example of what I mean).

Advertisement
The cover view for artwork in the Mini Media Player custom card for Home Assistant
cover: display the current artwork in the background.
The cover-fit view for artwork in the Mini Media Player custom card for Home Assistant
cover-fit: full cover without cropping.
The 'no artwork' view for artwork in the Mini Media Player custom card for Home Assistant
none: no artwork.
The full-cover view for artwork in the Mini Media Player custom card for Home Assistant
full-cover: full artwork
The material view for artwork in the Mini Media Player custom card for Home Assistant
material: alternate artwork display with dynamic colours

Mini Media Player advanced options

The basic settings you can configure using the UI are all fine and well, but perhaps more interesting are the advanced options the Mini Media Player custom card for Home Assistant offers. These include tap actions, a built-in field for text-to-speech, speaker groups, and shortcuts. The advanced options all have to be configured using the code editor.

Text-to-speech field

By adding the following two lines, a field for text input can be added to the Mini Media Player. The field can be configured to use any of the available TTS engines in Home Assistant, for example, google_translate or amazon_polly, or cloud (Nabu Casa).

tts:
  platform: cloud
A text-to-speech field in the Mini Media Player custom card for the Home Assistant dashboard

Speaker groups

If you are the owner of Sonos, Bose SoundTouch, or Yamaha MusicCast hardware, you can also create speaker groups in the Mini Media Player custom card itself. Squeezebox, Bluesound, and Snapcast are also supported, but do not offer all features yet. Finally, Linkplay compatible speaker require you to set up a custom component.

A mutli room setup in the Mini Media Player custom card for the Home Assistant dashboard
A multi-room setup with the Mini Media Player (source: GitHub)

Shortcut buttons in the Mini Media Player custom card

Perhaps my current favourite function of the Mini Media Player card is the ability to add shortcut buttons. Sure, you could add this using button cards placed below the custom card, but this way of doing things keeps everything nice and compact.

In my case, I use the shortcuts to tune in to radio stations I can’t access using voice commands on my Google Nest speakers. There are, once again, many options available when adding shortcuts. The basic one seen in the screenshot was created using the following lines of YAML:

shortcuts:
  columns: 4
  buttons:
    - name: Absolute Radio
      type: music
      id: URL_OF_RADIO_STATION
A shortcut placed in the Mini Media Player custom card for Home Assistant
A shortcut placed in the Mini Media Player custom card

The type can be basically any media, such as music, a television show, video, a certain channel, or a playlist. Obviously, the Mini Media Player custom card for Home Assistant can’t just be used for audio players, but also compatible televisions and streaming boxes. Using the latter, you can create shortcuts to any Spotify playlist, by adding the ID of the playlist using the following syntax:

Advertisement
spotify:user:XXXXXXX:playlist:37i9dQZF1DZ06evO2O09Hg

Alternatively, you can also trigger a script from a shortcut, or change the source from one room to another. Using the type service, you can execute just about anything.

Xiaomi is finally giving up on the Mi branding

Xiaomi introduces the Wi-Fi 6 capable Xiaomi Mesh System AX3000

Advertisement
Liam Alexander Colman, the author and maintainer of Home Assistant Guides.

About Liam Alexander Colman

Liam Alexander Colman has been using Home Assistant for various projects for quite some time. What started of with a Raspberry Pi quickly became three Raspberry Pis and eventually a full-blown server. I now use Unraid as my operating system, and Home Assistant happily runs in a Docker container. My personal setup includes many Zigbee devices as well as integrations with existing products such as my Android TV box. Read on to find out more on how I got started with Home Assistant.

Leave a comment

Advertisement