Playing Tidal mixes with automations

Hi

I want to do an automation where a Tidal mix is played. I followed the following guide to get the Media ID and test the automation, unfortunately Tidal mixes are not listed under Media.

What I did find out is that you can just take track or album URLs from the Web player and place as media_id, unfortunately this does not seem to work with mixes.

working:

action: media_player.play_media
metadata: {}
data:
  media:
    media_content_id: tidal://album/274740907
    media_content_type: album
target:
  entity_id: media_player.wohnzimmer_2

not working:

action: media_player.play_media
metadata: {}
data:
  media:
    media_content_id: tidal://mix/002302060c21542ecf6f4f8d78d7db
    media_content_type: playlist
target:
  entity_id: media_player.wohnzimmer_2

With the error: ‘NoneType’ object has no attribute ‘get’

Any idea how to do that? Thanks in advance!

Ok, I figured it out. The trick is not to use the URL from the browser, but to look up the “provider details” in Music Assistant (is this a new feature?) on the very bottom of the mix and copy that link. There it will be a URL containing “playlist” instead of “mix” which can actually be played by Music Assistant.

So this code works:

action: media_player.play_media
metadata: {}
data:
  media:
    media_content_id: tidal://playlist/mix_002972859ce56d8663a2b3c3603707
    media_content_type: playlist
target:
  entity_id: media_player.wohnzimmer_2