Lovelace: Mini Media Player

I had the same issue for the last update and this one. The lovelace file isn’t being updated with the new version even though the js file is downloaded. This seems to only happen with this card for some reason.

Maybe this can help you as well?

I edited it to 0.8.7 - it was correct format in old version. It just isn’t being written to the lovelace file.

Thanks! I was missing the “entity:” leader for the list items.

1 Like

Yes, in this way i have it in the lovelace card updated.

I’m getting an error with “element.setConfig is not a function” when using this module.

I’ve cleared cache and cookies. Tried a different browser. Made sure that the code is up to date by copying it directly from the GitHub file. Not sure why this is happening.

I am on 0.80.2. Made sure that the froentend is set to latest.

Any ideas on what might be wrong on my end?

Try 0.80.3, it fixed a number of gui issues.

No go. :tired_face: Had to manually target 0.80.3 as well. Same error appears.

I’ll have to keep digging in and see what might be going on.

It looks like it is referencing Uncaught SyntaxError: Unexpected token { in the debug logs. Checking the code now to see if i can find it.

I would guess it’s a compatibility issue with this card and vertical-stack-in-card, custom cards doesn’t always play nice together. It probably works if you don’t nest it inside the vertical-stack-in-card.

Try the latest version of vertical-stack-in-card, I saw the latest release had a fix for LitElement cards.

Still throwing the Uncaught SyntaxError: Unexpected token { when on its own. The actual UI error is saying it doesn’t exist but looking into the logs it shows that error for it. Gonna try some more things and see what I can find out.

Can you check what line in the code the error refers to?

Decided to test this one but it’s not working…
Getting error:

http://192.168.1.9:8123/local/custom-lovelace/mini-media-player/mini-media-player.js?v=0.8.7:7:1 Uncaught SyntaxError: Unexpected token <

resources:
  - url: /local/tracker-card.js?v=0.1.5
    type: js
  - url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js
    type: js     
  - url: /local/custom-lovelace/swipe-card/swipe-card.js?v=1.0.3
    type: js 
  - url: /local/custom-lovelace/mini-media-player/mini-media-player.js?v=0.8.7
    type: module  
  • type: entities
    title: Roku
    entities:
    • entity: media_player.tv_bureau
      type: “custom:mini-media-player”
      name: Roku salon
      group: true
    • entity: media_player.sfroku_3__soussol
      type: “custom:mini-media-player”
      group: true
      name: Roku sous-sol
    • entity: media_player.sfroku_3__chambre
      type: “custom:mini-media-player”
      group: true
      name: Roku chambre
    • entity: media_player.sfroku_3__bur_syl
      type: “custom:mini-media-player”
      group: true
      name: Roku bureau

`

Give a try this way instead:

  • url: /local/mini-media-player.js?v=0.8.7
    type: module
    i moved the js file to www and it worked for me

oh! that worked!
weird though… is this something that will be fixed? my OCD is kicking in lol

You can put the file/files wherever you want inside the www directory, as long as you point the resource reference to the correct location.

If you put the mini-media-player.js file in /www/custom-lovelace/mini-media-player/ for example. Your resource reference would have to look like this:

  - url: /local/custom-lovelace/mini-media-player/mini-media-player.js?v=0.8.7
    type: module

That’s what I did as shown in my post (and I triple checked it…)

Strange, The error you had indicates that the file wasn’t found.

BTW, this is awesome, saves so much space, I was able to merge my media streamers and my music devices in one panel…

1 Like

/local/custom-cards/mini-media-player.js?v=0.8.7:2:8 Uncaught SyntaxError: Unexpected token { Is what the error is throwing.

I tried putting the file in the top level /www/ folder but still having the same error popping up. Made sure the LoveLace config reflected and still the same. :thinking:

Well… I feel like a complete moron now.

I guess there was a change at some point that it went from type: js to type: module that I completely missed. I noticed everyone else’s input and then made the change to module and lo and behold, it works now; even in vertical-stack-in-cards.

Definitely seems to be something involving the vertical-cards-in-stack. The initial page with vcis freaks out, then go to another tab without that but mini, go back to that tab and it works. Workaround is to have one mini outside of vcis and it works fine.