If you have a Sonos Connect (or Amp, or Port) like me, and you connect it to your home theater receiver, you might’ve run into the issue that it’s not really plug and play. You can start music with the Sonos app, but it will not power most receivers automatically, especially when you connect it through an optical cable for example.
Sonos has a nice feature in their apps as well where you can set the volume of the Connect to passthrough, which means it will not actually set the output volume of the Connect, but we can still read that volume from the Sonos API.
That’s why I’ve made a blueprint that does the following:
- Switches a
media_playerentity, like your receiver, to the right source when you start playing.
- Turns off your receiver if it’s still set to the Sonos source after you stop playing music.
- Pauses Sonos playback if you turn off your receiver or switch it to another source.
- Synchronises the volume you adjust in Sonos with that same
- Synchronises the volume setting of the
media_playerback to the Sonos, for example when you twist the volume knob.
Works great between my Sonos Connect (gen 2) and Denon AVR-X1600H. Not tested with anything else, please let me know how well it works for your setup!
There’s a configurable buffer delay for the volume synchronisation so they don’t keep adjusting each other. 1 second works for me, but you might want to put in a higher value if you notice weird behaviour with the volume. Or you can just turn it off if you don’t need it, or like the output adjustment of the Connect itself. (Which I don’t recommend, because it reduces audio quality.)
Check out the source right here: sonos_connect_sync.yaml · GitHub