Hi, I’m very new to Home Assistant but so far it’s been pretty easy to get started. I’m running into a bit of an issue though and although I’ve found some materials on the matter I’ve been unable to figure out a working solution so I’m posting here.
I want to be able to stream from my youtube music subscription (family) to our sonos speakers through home assistant. It seems that Music Assistant is the approach some people take but I’ve run into this issue when getting the youtube music provider integrated: Youtube Music status: 🔴 · Issue #4348 · music-assistant/support · GitHub.
Are others doing this? If so what approaches are viable?
If you add YT Music as a connected service in the Sonos app, you can then add playlists and other items as “Sonos Favorites”.
If you add the Sonos intergration to HA, you can see your Favorites in the attributes ofthe “Sonos Favorites” sensor (sensor.sonos_favorites). For example, I can see in mine this attribute:
FV:2/29: YouTubeMusic Supermix
You can start any of these using the play_media action:
- action: media_player.play_media
data:
media:
media_content_id: FV:2/29
media_content_type: favorite_item_id
metadata: {}
target:
entity_id: media_player.sonos_kitchen
Then you can control playback in the normal ways using a media player card. I have a dashboard with buttons for all of my sonos favorites that runs a script that joins all of my sonos speakers together then starts the playing the favorite.
Not as nice as using Music Assistant, but as you can see from the issue page that you linked, it’s not likely to be sustainable to be able to use YT Music with MA.
Thanks for that. I can see things I favorite in the sonos playlists now, but is there a way to search for a random song and stream that from YT Music through to Sonos, or do I have to add them first to the sonos favorites in the sonos app?