Sonos does not always play doorbell audio

I have made a script to play a doorbell chime on my Sonos speaker in the kitchen - I call sonos.snapshot and sonos.restore to pause and resume any music already playing (I got the inspiration from Playing UniFi G4 Doorbell Chime through Sonos with Home Assistant - John Zanussi).

A few times I have experienced that the sonos speaker stays silent if it hansn’t been playing anything for a long time - for example overnight. If I then play some music from the sonos app everything works again.

Any ideas?

Scipt below:

alias: Ringeklokke Sonos
  - service: sonos.snapshot
      entity_id: all
  - service: media_player.volume_set
        - media_player.kokken
      volume_level: 0.66
  - service: media_player.play_media
      media_content_id: /local/Unifi-Chime.mp3
      media_content_type: music
      entity_id: media_player.kokken
  - delay:
      hours: 0
      minutes: 0
      seconds: 4
      milliseconds: 0
  - service: sonos.restore
      entity_id: all
mode: single
icon: mdi:doorbell
1 Like

Keen to see how this gets resolved & ideas people have, I was thinking of doing this myself!

Hi there,

I am still using this script and haven’t had issues for a long time. I did add a second script to play the same chime on another device, and call both from the doorbell - so now I have a double sound, but I have kind of gotten used to it :wink:

Go ahead and do this - and let me know how it goes :+1:t2: