Setting Sonos speaker crossfade in automation

My automation uses Music Assistant to play music and media player Action options to set the volume en join speakers. What I’m looking for is the ability to set the ‘Crossfade’ option of the Sonos speakers ON through a home assistant automation. I don’t see the option in the ‘Add action’ options.

Go to Developer Tools → States and enter crossfade in the Filter Entities field.

You will be presented with a list of switch entities, one for each Sonos speaker.

For example, if you have a Sonos speaker named media_player.bedroom, you should see a switch.bedroom_crossfade entity.

In your automation, you can use the switch.turn_on action to enable it.

action: switch.turn_on
target:
  entity_id: switch.bedroom_crossfade

Reference

Switch integration

Wow, so simple, thank you for this explanation @123 !

1 Like