Lovelace: Mini Media Player

i think i found a solution…?!
i changed my script…
I think this is a good approach.

alias: start stop netflix
sequence:
  - service: media_player.select_source
    target:
      entity_id: media_player.fire_tv_192_168_178_168
    data:
      source: |
        {% if is_state("media_player.fire_tv_192_168_178_168", "playing") %}
          !com.netflix.ninja
        {% elif is_state("media_player.fire_tv_192_168_178_168", "idle") %}
          com.netflix.ninja
        {% elif is_state("media_player.fire_tv_192_168_178_168", "paused") %}
          !com.netflix.ninja
        {% elif is_state("media_player.fire_tv_192_168_178_168", "standby") %}
          com.netflix.ninja
        {% elif is_state("media_player.fire_tv_192_168_178_168", "off") %}
          com.netflix.ninja
        {% else %} {% endif %}
mode: single

Hi. im having troubles getting the Source icon showing on my card


image

Hi all!
Is there a way to have all the sonos players in a group be automatically grouped when using a shortcut button?

A shortcut can execute a script, so use the media_player.join service

Thank you, ok I’ll try that.
That would mean one script per shortcut (in my case different sonos favorites), right?

When I play certain radio links, I do NOT get data through about “media_title”.
I don’t know why this is happening and if I can hardcode this info.

If I play
http://live-icy.gslb01.dr.dk/A/A09H.mp3
https://stream.anr.dk/anr
https://webradio.classicfm.dk/classichorsens.aac
Then it’s working fine, I get the Media_title…

But if I use one of these, it plays - but I don’t get any info about the “Media_title”
'http://edge-bauerdk-05-gos2.sharp-stream.com/thevoice_dk_tunein_mp3?’
https://live-bauerdk.sharp-stream.com/thevoice_dk_mp3

I don’t get it, why there is no “media_title”

I have this test button, i get the sound, artist, music number - but I don’t get the “media_title” so I can see that info inside my media_player.bluesound_stue attrributes:

show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: media_player.play_media
  target:
    entity_id: media_player.bluesound_stue
  data:
    media_content_id: https://live-bauerdk.sharp-stream.com/thevoice_dk_mp3
    media_content_type: music
    extra:
      title: The Voice
      thumb: http://homeassistant.local:8123/local/image/radio/nova.jpg
name: The Voice
icon: mdi:speaker
show_state: true
entity: media_player.bluesound_stue

Thanks for this really awesome. Is there any way to swap the volume and seek/progress bars?
Also would be awesome if there was a way to integrate the spotcast selector so the source input could include chromecast devices.

Some online sources simply don’t provide the info in their stream

ok, but can I hardcode it then?

I am struggling on the last little piece to make this look how I want, does any one know how to change the material artwork gradient to be “to bottom” instead of “to left”?

background-image: linear-gradient(to left, transparent 0px, rgb(240, 199, 195) 500px, rgb(240, 199, 195) 100%);

This is how the element renders in chrome but I cant work out how to change the styling with card mod.

Hi:
It’s posible to create two dropdown lists in the same player. I have buttons for radio stations and a list for spotify playlist, but I prefer to change buttons for a list but I don’t know how because I have one list yet.
Thanks in advance.

Try using the foldable entity row card with mini media player cards to arrange the panel

Hi,

idle_view is schaniging the icon. Is there a option to get the source icon or to setting the icon for the idle players?

With idle view:
Screen_20230226-110043

Without idle view:
Screen_20230226-110232

Thank you.

how can i call a Echo / Alexa Routine with a button? My Entity is the Echo itself

I have stereo speakers wired to a Yamaha RN303 that supports music cast. Channel A goes to garage, Channel B goes to porch speakers.

How do i get the mini player access to toggle those channels? I have tried adding the musiccast into it but it keeps throwing an error. It says "Failed to call service musiccast_yamaha/join. Service not found.

I read the documentation best I can I did try doing just musiccast but that gave me the same error.

First time posting so excuse the newb formatting

type: entities
entities:
  - type: custom:mini-media-player
    entity: media_player.dad_s_stereo
    name: Amplifier
    group: true
    hide:
      source: true
      volume: false
      volume_level: false
      controls: true
      power: false
    speaker_group:
      platform: musiccast_yamaha
      show_group_count: true
      entities:
        - entity_id: switch.speaker_a
          name: Garage
        - entity_id: switch.speaker_b
          name: Porch
    volume_step: '1'
    max_volume: '100'
    min_volume: '1'
  - type: custom:mini-media-player
    entity: media_player.wiim_mini_c03e
    name: WiiM Player
    group: false
    icon: mdi:music
    info: short
    hide:
      power: true
      volume: true
      volume_level: true
      source: true
      prev: false
      next: false
      play_pause: true
    toggle_power: true
    artwork: none
state_color: false
title: Music

Okay I got it working the way I want to with one exception. For some reason icon_state doesnt work. I have tried other setups but for some reason I am not able to get the garage or porch buttons to light up when the speakers are on. The buttons do work though.

image

type: entities
entities:
  - type: custom:mini-media-player
    entity: media_player.dad_s_stereo
    name: Amplifier
    support_master: false
    group: true
    hide:
      source: true
      volume: false
      volume_level: false
      play_pause: true
    shortcuts:
      columns: 2
      buttons:
        - icon: mdi:speaker
          icon_state: true
          type: script
          name: Garage
          id: script.power_to_yamaha_reciever
        - icon: mdi:speaker
          icon_state: true
          name: Porch
          type: script
          id: script.porch_speakers
    volume_step: '1'
    max_volume: '100'
    min_volume: '1'
show_header_toggle: false

Homepod: how to create shortcut buttons for tunein using a apple homepod?

Figured it out on my own, there is some mention of card-mod and using shortcuts on buttons, pretty sure the syntax is incorrect. I find it really funny more people dont have stereo amplifiers and have pair’s of speakers around there house. Here is the code to make the buttons illuminate whenever the switch for the reciever channel A or B is “on”

image

type: entities
entities:
  - type: custom:mini-media-player
    entity: media_player.dad_s_stereo
    name: Amplifier
    group: true
    hide:
      source: true
      volume: false
      volume_level: false
      play_pause: true
    shortcuts:
      hide_when_off: false
      columns: 2
      buttons:
        - icon: mdi:speaker
          type: script
          name: Garage
          id: script.power_to_yamaha_reciever
        - icon: mdi:speaker
          name: Porch
          type: script
          id: script.porch_speakers
    volume_step: '1'
    max_volume: '100'
    min_volume: '1'
    card_mod:
      style:
        mmp-shortcuts $: |
          mmp-button:nth-of-type(1) {
            {{ iif(is_state("switch.speaker_a", "on"),"background-color: var(--accent-color)") }}
            }
           mmp-button:nth-of-type(2) {
            {{ iif(is_state("switch.speaker_b", "on"), "background-color: var(--accent-color)") }}
            }
show_header_toggle: false
1 Like

Why do I loose the buttons when I use the below as entity?
If I set the entity to one of my sonos devices the buttons are visible, if I use the input helper which is actually “the same thing” then buttons dissapear.

entity: media_player.{{states('input_select.sonos_music_master_speaker') }}

That doesn’t look like a proper single quote, which is this character '