UPDATE: added fast forward and rewind templates to skip/previous button. Holding the skip button fast forwards 15 seconds. Holding previous button rewinds 15 seconds. Keep holding will keep forwarding/rewinding 15 seconds, every 1 second. I added that to the original code. For people wanting to add the without searching for code, replace this part with the current hold_actions for both buttons. Ofcourse you can change the seconds and hold repeat durations.
This is not a player, itâs a control card (like default media card and mini-media-player card). Use the media browser in your sidebar to play your media. See the media source integration on how to play local music with Home Assistant: Media Source - Home Assistant
note: this has nothing to do with my player card. I donât use local music, so I canât help on this matter further.
I use border-radius for my cards in my theme, instead of the picture-elements card. Add --ha-card-border-radius to the card-mod variable at the top and it should work outside of theme. Change 20px to what you like.
Having trouble getting this running, I have added the button under template in lovelace ui and the speaker under decluttering templates, then created card with entity setup correctly. This is what I get:
"Cannot read properties of null (reading âmedia_card_speakerâ)
When I look in the lovelace yaml after both templates and decluttering templates it says ânullâ. Any ideas what I have done wrong?
Wow thanks for the quick response. I have moved the button card info and now it is working! I have visited several dozen websites about the lovelace ui yaml file and how to use templates not seen anything clearly stated about where to place these.
New to HA, now I know I will put all code in the correct format.
Unfortunately not. I have no experience with coding in order to create a custom card. My card basically uses other cards to build this layout. I would need to create a complete stand alone card where I re-write the used components. I would love to do this, because then I wonât depend on other cards, but I have no coding experience at the moment.
It just takes the whole width like any card works. So if you want to take it less space, use it in other cards like horizontal-stack, vertical-stack, grid or layout-card.
this post is from almost 2 years ago, but i still hope someone would be able to help hereâŚ
since few days I;m trying to style the media player pop up card
I saw your examples, but I feel that I;m missing something important, but pretty easy.
What I understood I should define style in the lovelace editor , correct?
Can you please share the direct code:
Hi, from what I can remember, editing the background of that card was very annoying. I wasnât so experienced with card_mod shadows and variables, so I ended up editing the code from the card and saving that as an alternative. It was this line in the .js file of that card:
And then I added background-popcard in my themes as a color, so I could change that more easily. In my case I wanted the background to be completely gone, so I used:
background-popcard: 'rgba(0, 0, 0, 0.00)'
But you should be able to alter with card_mod. You should ask for help in the card_mod thread, since thatâs also what youâre trying to use. There are some great minds there, so Iâm sure they can help you find the correct code.
I donât use this card anymore the way I used it in a horizontal-stack, so I canât help you any further.
Thanks
I canât take credit for that part though a guy on Reddit helped me set it a while ago now.
Itâs basically a node red flow with code that drags info from the sky sports fixture list so if that changes this changes. HERES the original post where he helps me.
I can export my node red flow next time Iâm on my laptop then you just import that and copy across the images to the correct folder
And if you want the custom pop up you need to add some custom cards and some code to the âraw configurationâ
Itâs all on that link if you want to try yourself for now.