Automation turn_off sonos keeps playing

Hi,

Just moved from Domoticz to Home Assistant and most things work out of the box nicely.
Just one thing I can’t seem to get working with my Sonos connect.

I added in the automation.yaml an automation to turn everything off at a specific time, but the Sonos keeps playing.

- alias: 'Muziek uit 02:00'
  description: ''
  trigger:
  - platform: time
    at: 02:00:00
  condition: []
  action:
  - service: media_player.turn_off
    entity_id: media_player.woonkamer
  mode: single

I don’t see anything in the log, so the question is, what am I doing wrong here?

Thanks,
Gandarf

1 Like

Try media_player.stop

Nope, with media_player.stop there is an error: Unable to find service media_player.stop

Always a good idea to look in dev tools → services to see what are available. I am seeing options including media_player.media_pause, media_player.media_play_pause, and media_player.media_stop. Have you tested any of these in dev tools first?

Yes! Thanks :blush:

media_player.media_stop and media_player.media_pause work :+1:

1 Like

Does anyone what the difference is between the two? While there was a difference when we still had tape players for any modern media player like Sonos they are the same

Found this through search and it was helpful so thanks everyone.

@hesspoint I think it has something to do with being able to pickup where you left off. So music can be paused but when you use the radio the only option you have is “Stop” as I guess you can’t pause the radio (even Internet Radio) unless Sonos were then to offer you the option to record everything you miss.