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!
No, thanks.
It will size to the size of the background image, so make the background image the size of the typical album art. It really is as simple as that. The question was: I want an image displayed when thereās no art, keeping the sizing in tact.
You donāt need card mod. See above.
Source: Iām doing it all, which is why I suggested it in the first place. Just an image, sized correctly.
If youāve got that working, please post your YAML.
For whatever reason, without card_mod
, the card always collapses when there is no cover art to what I showed here using either full-cover
or full-cover-fit
, and with the image sized to 385x385, 640x640 or 1600x1600.
1600x1600 is whatās recommended for Spotify cover art, so I assume thatās what you mean by typical.
Well, there seems to be at least 2 of us whose experience is different from yours - would be helpful if you posted your code as requested.
Iām doing it for the cover
artwork option. It only transpired later that thereās a requirement for the full-cover
and full-cover-fit
options, and in that case, I donāt see another option. Itās ironic (to me) to make something that was designed to be mini not-so-mini, but to each their own.
Re: Mantaining card aspect ratio when using artwork: full-cover
if no cover art is available or when the target player is idle.
Currently, if there is no cover art available or when the target payer is idle, the card will collapse from the 1:1 ratio of cover art to the minimum size needed to fit any configured control and information elements of the card. For better control over the position of cards on a dashboard, it can be desireable to maintain the same size and shape of the card
If youāre looking to do this, the most consistent way appears to be setting the overall card aspect_ratio
with the custom component card_mod. At least, this has worked for @reste_narquois and me in testing.
Hereās a comparison using a square background image:
And here is the configuration for the rightmost card:
type: custom:mini-media-player
entity: media_player.dining_room
card_mod:
style: |
ha-card {
aspect-ratio: 1 / 1;
}
artwork: full-cover-fit
background: /local/images/idle_grid_dark.png
Note that artwork: full-cover
and artwork: full-cover-fit
have the same result in this case.
Is it possible to get a volume slider for each Sonos speaker in my group?
If I use the volume slider in the top of the card, it only changes the volume for the master speaker (The first speaker I used as entity when the card was created).
I would like to be able to change the volume for each speakerā¦
Code for the card:
type: custom:mini-media-player
entity: media_player.koekken
hide:
power: true
speaker_group:
platform: sonos
show_group_count: true
entities:
- entity_id: media_player.koekken
name: Sonos KĆøkken
- entity_id: media_player.stue
name: Sonos Beam Stue
- entity_id: media_player.badevaerelse
name: Sonos BadevƦrelse
entities:
- type: custom:mini-media-player
entity: media_player.multiroom_player
group: true
source: icon
artwork: cover
info: short
hide:
volume: false
power: true
- type: custom:mini-media-player
entity: media_player.koekken
group: true
hide:
controls: false
- type: custom:mini-media-player
entity: media_player.stue
group: true
hide:
controls: false
- type: custom:mini-media-player
entity: media_player.badevaerelse
group: true
hide:
controls: false
artwork: cover
source: full
sound_mode: full
Quick Question.
How would I change the name of the dropdown list?
> > type: custom:mini-media-player
> > entity: media_player.kitchen_2
> > name: Kitchen Speaker
> > artwork: cover
> > source: full
> > sound_mode: full
> > background: /local/radio/radiobackround.jpg
> > show_tts: true
> > shortcuts:
> > name: Radio
> > columns: 2
> > list:
> > - type: script
> > name: Wild Country Radio
> > id: script.wild_953
> > - type: script
> > name: Amp Hits Radio
> > id: script.amp_radio
> > group: false
> > info: scroll
> > speaker_group:
> > platform: sonos
> > show_group_count: true
> > entities:
> > - entity_id: media_player.kitchen_3
> > name: Sonos Kitchen
> > - entity_id: media_player.sonos_roam_3
> > name: Sonos Bedroom
Iām not sure if you can configure individual volume controls, however you are able to make the main slider control all speakers in the group using sync_volume:
. I know its not what you asked for, but maybe could help your use case?
speaker_group:
platform: sonos
show_group_count: true
sync_volume: true
....
Thanks for the reply!
Itās way better then before, I will implement this and give it a try.
Iām kinda new til HA/YAML, so not that strong with this yet.
Could I make it so the speakers volume slider is always available, and not just under the āgroupingā menu? That way I could have a card that I could expand or something, and then change it individual.
Another question regarding this also:
I have tried to create some buttons to start spotify playlists from, but I canāt start the stream to my speakers. I get the same results, when I test in the āDeveloper Toolsā under āServicesā.
I have tried to stream to both the āKĆøkkenā and āStueā speakers with no luck.
I use the information in the āNameā field, as I understand i shouldān be the āEntity IDā.?
type: custom:mini-media-player
entity: media_player.koekken
max_volume: '35'
hide:
power: true
speaker_group:
platform: sonos
show_group_count: true
sync_volume: true
entities:
- entity_id: media_player.koekken
name: Sonos KĆøkken
- entity_id: media_player.stue
name: Sonos Beam Stue
- entity_id: media_player.badevaerelse
name: Sonos BadevƦrelse
entities:
- type: custom:mini-media-player
entity: media_player.multiroom_player
group: true
source: icon
artwork: cover
info: short
hide:
volume: false
power: true
- type: custom:mini-media-player
entity: media_player.koekken
group: true
hide:
controls: false
- type: custom:mini-media-player
entity: media_player.stue
group: true
hide:
controls: false
- type: custom:mini-media-player
entity: media_player.badevaerelse
group: true
hide:
controls: false
artwork: cover
source: full
sound_mode: full
icon: mdi:music
background: /local/spotify/radiobackground.jpg
shortcuts:
columns: 3
buttons:
- name: Tessa
type: service
id: spotcast.start
data:
device_name: KĆøkken
uri: spotify:playlist:3pJK3CUpbnyX7ogDfAwa9J
random_song: true
shuffle: true
Nevermind, for some reason it started working when I created a new dashboard and view, however, artwork isnāt showing, I saw someone hade the same issue on Github.
Hi everyone!
Iām trying to cast the MMP to my Nest Hub, Iāve read and triedā¦for some it seems to work and for some not.
I get the āCustom element doesnāt existā on the Nest Hub when casting, casting other stuff works.
Can anyone please help or point me in the right direction?