Lovelace: Mini Media Player

Hi !
The “full-cover” artwork option actually does not display the entire cover in case of vertical artworks (movie posters for instance). See example below:
Capture%20d%E2%80%99%C3%A9cran%20(16)

So I tried “full-cover-fit” option, which works great in this case. see screenshot below:
Capture%20d%E2%80%99%C3%A9cran%20(17)

However, when the artwork is in ‘landscape’, the ‘full-cover-fit’ options adds black margins on top and bottom of the image :
Capture%20d%E2%80%99%C3%A9cran%20(18)

So, is there a way to have a fit-to-width option or something similar ?

Thanks !

thanks :slight_smile:

The media player is a Google Chromecast Audio.

Right now the card looks for the media_content_type, if it’s music the card assumes the artwork is a perfect square 1:1 (album cover). If it’s video the artwork expects a thumbnail in 16:9 format and resizes the card accordingly.
This behaviour is very similar to the default media-control card.

full-cover-fit always displays in a square but instead of cropping the artwork it will resize it to fit and then display black bars if the aspect ratio isn’t 1:1.

I don’t think I’ll add any more artwork parameters, but I’m open to consider pull requests.

Just tried on one of my own CCAs and it worked, took a good 10-15sec for it to start playing though.

You’re correct… clearly I was just being impatient!

Thanks

seems I found a bug with the sync_volume options for the Sonos Group
evenif I have not grouped my Sonos Player the volume will be synced across both players (see video)

I get also two error messages in my log

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py”, line 289, in _handle_service_platform_call
await func(entity, data)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/init.py”, line 515, in set_volume_level
raise NotImplementedError()
NotImplementedError

and

Not passing an entity ID to a service to target all entities is deprecated. Use instead: entity_id: “all”

Okay, interesting!
I’ve no Sonos myself so I’m not able to test the Sonos specific features very well unfortunately.

Next time you have this bug (or if it’s present all the time), please send me the attributes of both Sonos entities.
You can find the attributes by opening the sidebar and pressing the < > icon at the bottom, or navigate to /dev-state

The errors you posted are most likely related to this bug.

Thanks!

Attributes from the master player:

shuffle: false
sonos_group: media_player.schlafzimmer
supported_features: 64063
media_content_type: music
volume_level: 0.2
source_list: B5 aktuell,ego FM,PULS,Superfly FM
friendly_name: Schlafzimmer
entity_picture: /api/media_player_proxy/media_player.schlafzimmer?token=fc9a990b7b815d96a423b762c3a5bf45a832357d25dea9c3d8457330f3da75a5&cache=bef7ea045c969302
source: Superfly FM
is_volume_muted: false
media_title: Superfly FM
media_artist:

Attributes from the second player:

shuffle: false
sonos_group: media_player.bad
supported_features: 64063
media_content_type: music
volume_level: 0.13
source_list: B5 aktuell,ego FM,PULS,Superfly FM
friendly_name: Bad
entity_picture: /api/media_player_proxy/media_player.bad?token=61c77b9d8b325ae63561a9c872b5b881defa4cb412b030cdab9b1050b62f7252&cache=078729dbdf6a88fe
source: Superfly FM
is_volume_muted: false
media_title: Superfly FM
media_artist:

when ever I can help to test please let me know

1 Like

Thanks, I’ll see if I can find the bug, I’ll let you know when/if I need help testing, thanks a lot!

BTW, I did open an issue#72 on github for tracking this.

great. thank you

I’m very happy with the volume_stateless option, which I just noticed.
Is is perhaps possible to make the volume steps configurable? I see a single step is now a 10%
volume increase/decrease.

Thanks :slight_smile:

I just discovered the mini-media-player and well… well done. Now for us amateurs that use Amazon stuff (firesticks and echos), is there a way to get an “idle_view” for our devices that don’t go “idle” but go “standby”? Or is there a way and I’m just oblivious to it.

Unfortunately no, the media_player.volume_up service has no such options, “step count” is handled on a component basis.
We discussed it a lot here: Request: configurable volume up/down buttons · Issue #10 · kalkih/mini-media-player · GitHub
And I believe @gerard33 even got the devs to change the step count in the sonos component to 0.02.

Thanks, I’m not familiar with amazon devices, do they report the state standby instead of idle when they become idle/standby?

Yes they do, the exact syntax (I will copy-n-paste) is: Standby

Perfect, just checked the source, should an an easy addition.
I opened an issue on github where you can track the progress.

A true gentleman and scholar…

1 Like

Is it possible to change the color of the power button when it is on and off?
Mine just stay “black”?

Yes, see config below.

# Power button accent-color when device is powered on
- type: custom:mini-media-player
  entity: media_player.example
  hide:
    power_state: false
  ...

hyperion_8123_lovelace_3

Arh yes - I saw that in the documentation, but I was unsure what it really did.

Thanks will give it a shot.