Linkplay: add entity_picture attribute (media image url) for media player, works for WiiM (#143328)

Add media image url to show as entity_picture
This commit is contained in:
Arjan 2025-04-30 19:59:25 +02:00 committed by GitHub
parent 24803b1e75
commit 5816d495e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -324,6 +324,13 @@ class LinkPlayMediaPlayerEntity(LinkPlayBaseEntity, MediaPlayerEntity):
+ [follower.device.uuid for follower in multiroom.followers]
]
@property
def media_image_url(self) -> str | None:
"""Image url of playing media."""
if self._bridge.player.status in [PlayingStatus.PLAYING, PlayingStatus.PAUSED]:
return str(self._bridge.player.album_art)
return None
@exception_wrap
async def async_unjoin_player(self) -> None:
"""Remove this player from any group."""