Is it possible to set the sonos favourites as button?
If yes, how?
What you mean with “source list” ? Can you share an example how to put sonos favorites in a source list?
Can you share the code you use for this?
Thanks…
I don’t have any examples as I changed from the mini media player over to the Sonos Player, it offers so many more options if you’re using a Sonos setup and is very easy to setup and maintain.
I just started playing around with this and set up a player with buttons that choose different Spotify playlists. Since I am using chromecasts and home mini’s it appears the only way to include or exclude various speakers is to create groups in the Home app and then use the media_player that gets created with those groups. However in my current button setup it only allows for the name of one media_player. Would it be possible to pass a variable to the Device_Name so that an input_select could be created with a list of all the media_players and choose a value to play in the mini_media_player? Then I could pick and choose the media_players based on the groups I created that should be playing. Unless there is another way to accomplish this?
buttons:
- name: Christmas
type: service
icon: mdi:music
id: spotcast.start
data:
device_name: ChromecastAudio. <- pass a variable/data template here?
uri: spotify:playlist:37i9dQxxxx
Hi all - Is it possible to define a static image to be displayed in place of the album art if not art is available? Thanks.
Thanks, this worked!
I tried searching for an answer to this but didn’t see anything. I am noticing a delay with the cover artwork changing when the next song begins and sometimes it doesn’t change at all (using Spotify). If I do a refresh of the lovelace page it immediately changes to the next song’s artwork. Is there something I can change that would control this that should be changed? I notice too that the not only is the artwork not moving to the next song the song title and progress bar aren’t changing.
Could it have anything to do with having this card in a stack-in-card or since maybe I am using the config-template-card could that have any impact?
Did you check the docs?
Yes, of course. This is the relevant section as far as I can tell:
There’s also this issue.
So, it’s looking like the answer is no. But, there’s often a way around “no” with HA. Or, I may have just missed it.
You can set a background image.
Thanks, but I’m using artwork: full_cover
and am looking to use substitute album art to maintain the size/shape/look of the card, for example when there is nothing in the queue rather than to have as a full card background.
EDIT: Solution here Lovelace: Mini Media Player - #2771 by ronschaeffer
I think the background only shows if there is no available artwork.
Have you tried it, or should someone come over and do it for you?
I think that even with a background image set, the card returns to its default mini size when the player is powered off or the queue is empty. This makes it smaller than when artwork is set to full-cover
and the player is on.
To keep the card a consistent size, I 've found I have to play around with card-mod
to set the height of the card. You might need to experiment to find the right height - this value keeps the player square in the app on my Pixel 4.
- type: custom:mini-media-player
card_mod:
style:
.: |
ha-card {
height: 385px;
}
artwork: full-cover-fit
Thanks, @nickrout . Perhaps I’m missing a setting, but this is what background:
like for me with no artwork. My goal is to maintain the 1:1 aspect ratio and size when there is no album art.
entity: media_player.dining_room
group: false
hide:
controls: false
icon: true
info: true
mute: true
name: true
power: true
progress: true
source: false
volume: true
info: 'no'
progress: false
tap_action:
action: url
url: app://com.sonos.acr2
type: custom:mini-media-player
volume_stateless: true
artwork: full-cover
background: /local/images/idle_art_1.png
EDIT: Slight revision here Lovelace: Mini Media Player - #2771 by ronschaeffer
@reste_narquois , thanks so much. That’s it.
Here’s what I ended up with as a test card:
type: custom:mini-media-player
entity: media_player.dining_room
card_mod:
style: |
ha-card {
height: 385px;
}
artwork: full-cover-fit
background: /local/images/idle_art_1.png
What are the dimensions of the jpg?
640x640
But, @reste_narquois 's suggestion worked. Would be nice to be able to do it without card_mod
. I’ll raise a feature request.
Thanks!