Trigger Sonos>Apple Music>Specific Artist/Song

So I know we can trigger SONOS to activate specific ‘favorites’ or Spotify Playlists.
Im wondering if there is a way to trigger Sonos to play a very specific item from the AppleMusic service. If so, how do I structure the YAML?

Please read the category descriptions before posting. Moved.

I created a helper input_text item called songtitle
I added this item to an entity card on my dashboard.
Now when I click on the card I can input a song title or genre.
I then created an automation that when the state of input_text.songtitle changes it runs a script.
The script takes the text from the input_text and feeds it to the media_content_id: field. Then my song is played.

Here is a sample of what my script looks like
#Play User selected Song

  alias: Play Song Title from Apple Music
  - service: media_player.turn_on
    data: {}
      entity_id: media_player.living_room_stereo
  - service: media_player.volume_set
      volume_level: 0.2
      entity_id: media_player.living_room_stereo
  - service: media_player.select_source
      source: audio1
      entity_id: media_player.living_room_stereo
  - service: media_player.play_media
      media_content_id: '{{ states.input_text.SongTitle.state }}'
      media_content_type: APPLE_MUSIC
      entity_id: media_player.charles_s_echo_dot

Hope this helps…but the key to this is getting the song title sent in the media_content_id code.

It would help but sadly it’s not working for me. :frowning:
None of my HomePods starts playing the song. Did something change in HA or am I doing anything wrong? Thanks for your answer in advance!