Getting Sonos to play from favorites in Node-red

I have had a great automation that plays the radio station I want when it is time to wake up. With the latest update it stopped working and I assume this has to do with favorites moving to a separate entity. I don’t know how to set it up in node red using the new sensor.

I use a call service node and based on the example on the Home Assistant Sonos page I have it set to send the following message:

domain: “media_player”

service: “play_media”

target: entity_id: “media_player.sovrum”

media_content_type: “favorite_item_id”
media_content_id: “FV:2/26”

I get the following error message:

“HomeAssistantError: Error calling SonosMediaPlayerEntity._play_media on media_player.sovrum: UPnP Error 402 received: Invalid Args from”

I would really like to solve this!!!

Using the same data, can you call the service from HA? You can go to dev tools → services to test it.

Good point - doesn’t work even if the yaml code is identical to what is suggested on the HA Sonos page (of course with the exception of the entity id and media id which are mine). I know my sonos favoriter sensor is exposed.