Starting with Sonos automations


I’m new to and now I start to automate my Sonos Media Players. First I want to create some scripts to use standard doings again from the script definition. So I create this:

  alias: "Sonos Master OFF"
    - service: media_player.turn_off
        - media_player.bad
        - media_player.buro
        - media_player.keller
        - media_player.kuche
        - media_player.schlafzimmer
        - media_player.terrasse
        - media_player.toilette
        - media_player.wohnzimmer

But if I set tap action to call-service and this service script_sonosmedia_master_off nothing happens. Whats wrong here?

Thanks you, Steffen

The service needs to be script.turn_on, and then you need to specify the entity ID of this script.

Whoops. I was wrong, see below.

No you dont. Scripts are services. This is vaild:

  action: call-service
  service: script.script_sonosmedia_master_off


could you explain a little bit more, I do not understood?

I want to create some basic scripts for my Sonos devices to use at the automations and fail at the first simple stop alle Sonos from playing. Is the script integration the right place to put the reusable sequences?

At my button I try this:

entity: sensor.tmp_sonosmedia_master
  action: none
show_icon: true
show_name: true
  action: call-service
  service: script.script_sonosmedia_master_off
type: entity-button

But I think it is a problem with the script because if I try the service at dev area nothing happens too!

Thank you.

TIL. Thanks for clarifying.

I mean you can do it your way, it’s just not the only way. Sorry if I came across as a bit rude. Was not my intention.


If the script is not doing what you expect when you run it from the dev tools services menu, check the log for errors.

At the logs I can not found something but I got it:




Sonos only stop the media but have no turn off function.


1 Like