mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
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:
parent
24803b1e75
commit
5816d495e3
@ -324,6 +324,13 @@ class LinkPlayMediaPlayerEntity(LinkPlayBaseEntity, MediaPlayerEntity):
|
|||||||
+ [follower.device.uuid for follower in multiroom.followers]
|
+ [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
|
@exception_wrap
|
||||||
async def async_unjoin_player(self) -> None:
|
async def async_unjoin_player(self) -> None:
|
||||||
"""Remove this player from any group."""
|
"""Remove this player from any group."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user