Lovelace: Mini Media Player

And your log says?

Hi, is there anyway to add a hot key to the Mini Media Player? I want to basically be able to press m to mute the media player.

Got the idea from the new Quick Bar capability released for entitities and commands.

Ok, so Iā€™m a total noobā€¦I managed to install the respository with HACSā€¦but what do I do now to have the mini media player appear as a card in my dashboard?

Thanks guysā€¦

You add a manual card to a view and enter the config as per the examples and documentation on github (see first post in this topic).

I think Iā€™m still missing something crucialā€¦it keeps saying ā€œno card type foundā€ when I try to add a code of the examples given.

Do I have to add this somewhere?:

"resources:

  • url: /local/mini-media-player-bundle.js?v=1.11.0
    type: module"

No need if you installed via HACS but if you want to be sure you can check the configuration / dashboards / resources menu.

Paste your card config.

Card-Config:

type: custom:mini-media-player
entity: media_player.gang
hide:
volume: true
source: true
power_state: false

Error:

Custom element doesnā€™t exist: mini-media-player.
type: ā€˜custom:mini-media-playerā€™
entity: media_player.gang
hide:
volume: true
source: true
power_state: false

Itā€™s working now. I reinstalled it again and didnā€™t use the version part of the url but the one HACS recommended instead.

Thanks guys

Should be found under Configuration > Lovelace Dashboard > Resources as seen here,

if not you can simply add it by clicking on the orange + button bottom right corner and adding the following URL & resource type then selecting Create.

image

I have the same problem, what is weird is that it has been working beforeā€¦
You have been able to solve this ?

          - type: "custom:mini-media-player"
            entity: media_player.keuken
            icon: mdi:music-box-outline
            toggle_power: false
            info: scroll
            more_info: false
            max_volume: 40
            volume_stateless: true
            #replace_mute: play_pause
            hide:
              power_state: false
              progress: true
              controls: false
              icon: true
              mute: true
              volume_level: false
            shortcuts:
              hide_when_off: false
              columns: 4
              buttons:
                - name: StuBru
                  type: playlist
                  id: 'http://opml.radiotime.com/Tune.ashx?id=s6503&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=f6cc6a101d38ff75b13940a8d20b7085'
                - name: Q Music
                  type: playlist
                  id: 'http://opml.radiotime.com/Tune.ashx?id=s69243&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=f6cc6a101d38ff75b13940a8d20b7085'
                - name: Joe
                  type: playlist
                  id: 'http://opml.radiotime.com/Tune.ashx?id=s102123&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=f6cc6a101d38ff75b13940a8d20b7085'
                - name: MNM Hits
                  type: playlist
                  id: 'http://opml.radiotime.com/Tune.ashx?id=s69137&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=f6cc6a101d38ff75b13940a8d20b7085'

And the error:

Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1448, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1483, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 482, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 519, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/squeezebox/media_player.py", line 501, in async_play_media
    content = json.loads(media_id)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hi. Iā€™m new to Homeassistant and Iā€™ve been trying to install a mini media player for two days to add to my SONOS but no matter how hard I try, I canā€™t get anything. I have installed with HACS and I think it is correctly installed but I donā€™t know what else to do because when I try to install in Lovelace nothing appears.

Could someone tell me where the error is?

There is no error in that screen.

Go to lovelace.
Click on edit dasboard (under the three dot menu on upper right)
Click the big plus to add a card
Click Manual
In the editor that pops up, type

type: custom:mini-media-player
entity: media_player.whatever

Click Save

Job done.

1 Like

PS please donā€™t post photos of your configuration. It is text. Copy and paste has been with us for decades.

3 Likes

Goedemiddag!

Yes, correct. It has been working for months.

No, it is still not working. I donā€™t know what these messages mean.
Yours look exactly the same. :frowning:

Isnā€™t someone here who can interpret that?

Ok thank you very much for your prompt reply. Iā€™m going to try it right now. I will also follow your advice for photos from now on.

Great thing youā€™ve created!
I saw some mentions about a TUNIN shortcut button should work, however it doesnā€™t with me

shortcuts:
  buttons:
    - id: Willy Radio
      icon: 'mdi:radio'
      name: Willy
      type: TUNEIN

Should I use the ā€œstation nameā€ or the ā€œidā€ from the url? (both didnā€™t seem work).

1 Like

I created an issue on Github:


Letā€™s hope this gets picked-upā€¦
1 Like

Thanks @kalkih for this great media player. I have been using it forever.

Was wondering, im using a shortcut for one of my daughters TVā€™s where i also turn on/off the tv through a script shortut button.

Would it be able to change icon for the media player to show a binary sensor for said object to more or less show off if its on or off?

bild

for example

platform: template
sensors:
  claratv_pwr:
      entity_id:
        - switch.claratv
      value_template: >-
        {{ is_state("switch.claratv", "on") }}
      icon_template: >-
        {% if is_state("binary_sensor.claratv_pwr", "on") %}
          mdi:television-classic-off
        {% else %}
          mdi:television-ambient-light
        {% endif %}

i kind of want an emulated_hue icon that tells me if the tv is on or off.

Would it be able to fork in so that we can use a binary_sensor in the icon field or something?

Cheers! and thanks again for a great app!

Newbie here. Iā€™m playing around with this mini media card and my Sonos speakers. Specifically I am trying to get the example working for ā€˜Speaker Group Managementā€™ from Github -

Right now Iā€™m trying with just three speakers with this code -

type: 'custom:mini-media-player'
entity: media_player.dining_room
hide: null
power: false
icon: true
source: true
speaker_group: null
platform: sonos
show_group_count: true
entities:
- entity_id: media_player.port
  name: Family
- entity_id: media_player.bathroom
  name: bathroom

But it just results in a player for dining_room and no group button. Not sure why this is failing though I note I donā€™t have any reference to a ā€˜masterā€™ speaker. Is this broken or am I missing something?
Thanks in advance for any ideas.