thlucas1 / homeassistantcomponent_spotifyplus

Home Assistant integration for Spotify Player control, services, and soundtouchplus integration support.
MIT License
56 stars 4 forks source link

Update media player attributes to support current playlist uri #21

Closed andrew-kennedy closed 5 months ago

andrew-kennedy commented 5 months ago

I'm not sure if this is allowed or complies with home assistant's default media player attributes, but it would be super useful to be able to get the current playlist Uri to be able to seamlessly transfer playback to other speakers.

thlucas1 commented 5 months ago

@andrew-kennedy I like the idea of having the playlist uri available.

I would also suggest the following:

If that works for you, I am making some other changes for the integration and can get them added within a couple of days.

Thoughts?

Example: image

image

thlucas1 commented 5 months ago

FYI - just released a new version of the SpotifyPlus integration

[ 1.0.27 ] - 2024/06/12

Added extra state attribute media_playlist_content_id that contains the Content ID of current playing playlist context if one is active; otherwise, None. Added property media_player.media_playlist_content_id that contains the Content ID of current playing playlist context if one is active; otherwise, None. Added property media_player.media_playlist_content_type that contains the Content Type of current playing playlist if one is playing; otherwise, None. Added property media_player.media_playlist_description that contains the Description of current playing playlist if one is playing; otherwise, None. Added property media_player.media_playlist_image_url that contains the Image URL of current playing playlist if one is playing; otherwise, None. Updated use_ssl description on all of the Zeroconf Device services.

Will close this PR as the above contains your requested changes.