The script I made is quite simple for now, just to test. Upon calling it, I hear the sonos taking a little pause, but then it continues to play “Studio Brussels”, no matter what I
I guess for starters, if sonos is the name of your script, it’s missing : after it
Also I don’t have a sonos so bear with me. For AV Receivers, changing the source means selecting another input. What is actually the source on your sonos?
If it’s a different media stream, I’m not sure your script will work on its own, you may have to use media_player.play_media
Again sorry, the lack of a : was a typo, it’s fixed in the original post now.
The script that I’m using, is based on another post. However, I have the feeling that the sonos component has changed quite dramatically since than.
What I do notice now, is that in the above screenshot all radio stations are listed under “source_list” instead of “source”. Not quite sure if the key to the solution is in there?
I thought I already thought about that, and changed it nevertheless, but apparently I didn’t… So it’s a good thing that I tried it again and indeed: the script of AlmostSerious works!