Lovelace: Mini Media Player

@Christian_Hollbjar:
Whenever I add your lines in the raw config editor I get an error message “unable to parse the yaml…”
"… bad indentation of a mapping entry in line 4 position 4.

title: Plexat
resources:

  • url: /config/www/mini-media-player-bundle.js
    type: module
    views:
  • panel: false
    theme: midnight
    badges:

Is something not working?

Please post your yaml Inside a code block, we can’t check if there’s anything wrong with your indentation otherwise.

perfect thanks

Actually i get problems with alexa tts platform and i read something changed about it in the new platform.

Should work as before from what I can see in the readme and wiki.
I suggest you open an issue in that repo.

If i try to send a text message from the frontend i get the following:

“Failed a call to service media_player/alexa_tts”

And i have this code:

      tts:
        platform: alexa
        language: 'it'
        entity_id: media_player.echo_spot

While i have it working as i use the UI services menu.

More, with amazon echo devices, will the url’s works as in google home devices? And a spotify playlist?

I don’t own any echos so I have no idea tbh since it’s platform specific.
Maybe you could utilize routines to achieve this.

I tried using routine configuring sequence as type and alexa.singasong.play as id (following the wiki) but i get always a call to service media_player/play_media without success… i think the mini-media-card doesn’t work at 100% with echo devices, that’s why i asked you about changes. BTW thanks for your support

I can’t see why it wouldn’t work, try to capitalize the words, like in the wiki examples.

Yes, with capital letter it works, so now, why if i put an URL as media content and music as content type it doesn’t work?

1 Like

I don’t know, you’ll have to try, or ask the developer of the echo media player component.

I have this configured for an echo device:

      shortcuts:
        buttons:
          - name: Eric Andersen
            type: playlist
            id: spotify:artist:6t2MHOFOYTYNUXi9CNjP5A

But it doesn’t work… if i tell by voice alexa to play this, it works!

Just create an Alexa routine for it and then call that routine.

Ok, i’ll try…

As I’ve said before, the media_player.play_media service is platform specific, if it doesn’t work, it doesn’t work.

Getting this error when trying to change the media played in spotify media player:

2019-02-24 16:42:35 ERROR (MainThread) [frontend.js.latest.201902200] https://myduckdns.duckdns.org/customcards/lovelace/resources/mini-media-player-bundle.js:1:65466 Uncaught TypeError: Cannot read property 'type' of undefined

This happens only if i use list: in place of buttons:

When is this happening, when you press a shortcut item or the next/prev button?
Can you post the card config, thanks.

It happens when i press a shortcut item.
The card config is:

  - type: custom:card-modder
    card:
      type: custom:mini-media-player
      entity: media_player.spotify
      name: Spotify Player
      icon: 'mdi:spotify'
      max_volume: 70
      icon_state: true
      shortcuts:
        buttons:
          - name: The Rock Show
            type: playlist
            id: spotify:user:spotify:playlist:37i9dQZF1DWZNFWEuVbQpD
          - name: Reggae Infusions
            type: playlist
            id: spotify:user:spotify:playlist:37i9dQZF1DWSkkUxEhrBdF
          - name: Progressive Rock Italia Anni 70
            type: playlist
            id: spotify:user:giuseppemurolorock:playlist:7dBYCuTqxnGgnwA0bErvSO
          - name: Prog Rock Monsters
            type: playlist
            id: spotify:user:spotify:playlist:37i9dQZF1DX0uqkwkR49kK
          - name: Discovery Weekly
            type: playlist
            id: spotify:user:spotify:playlist:37i9dQZEVXcNGrmo69mxgs
          - name: Release Radar
            type: playlist
            id: spotify:user:spotify:playlist:37i9dQZEVXbsercmBKThd0

In this way it works… if i use list: in place of buttons: i get that error…

1 Like

@kalkih,
Sorry, I did not get it right. Did not read properly.

title: Plexat
resources:
  - url: /config/www/mini-media-player-bundle.js
    type: module

here is where I get the error from

Need to see it in context as well, that looks alright by itself.