Cannot get media_player.volume_mute to work with Sonos via script

Hello. I have built integration between Alexa and my Sonos system using Home Assistant. I have been pulling my hair out trying to figure out why I cannot get the mute/unmute feature working in my script. Everything else in the script works perfectly and I get no errors. But the Sonos unit will not unmute. This seems pretty simple to me and I’m at a loss as to why it will not work. Any ideas anyone? Thank you in advance.

Brian

sonos_on_the_terrace:
  sequence:
    - service: sonos.join
      data_template:
        master: '{{states.sensor.sonos_group_master.state}}'
        entity_id: media_player.terrace
    - delay:
        seconds: 3
    - condition: template
      value_template: '{% if states.media_player.terrace.state != "playing" %}true{%endif%}'
    - service: media_player.volume_mute
      data_template:
        entity_id: media_player.terrace
        is_volume_muted: false
    - service: media_player.media_play
      data_template:
        entity_id: '{{states.sensor.sonos_group_master.state}}'
1 Like

Did you ever resolve this issue?

Yes actually. I’m at work now and cannot share my solution. But I will try to remember to do so when I get home.

2 Likes