Hi there,
When someone rings our Unifi doorbell, an announcement (media file) is played on both our Sonos speakers. What I want to achieve is that this announcement is aborted / killed / stopped when somebody opens the door (i.e., value of the door sensor changes from closed to open. And, moreover, when (one of the) speakers was playing music before the announcement, the music should resume after the announcement has been aborted.
Unfortunately, I cannot get this working (well, I found a kind of hack by starting a ’ white noise’ announcement when the door is opened.)
How should I get this working a proper way?
(Note I tried to achieve this both using Home Assistant as well as Music Assistant as media players and announcement ‘players’).
Here I post the Music Assistant (combined players) configuration which I currently use, because the ‘join’ players options in Home Assistant (sonos integration) causes a slight delay in one of the speakers (but that’s another topic).
data:
announce: true
media_content_id: media-source://media_source/local/song.mp3
media_content_type: audio/mpeg
metadata:
title: song.mp3
thumbnail: null
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- media_content_type: ""
media_content_id: media-source://media_source/local/song
action: media_player.play_media
enabled: true
target:
entity_id:
- media_player.sonos_group
action:
- service: media_player.media_stop
target:
entity_id: media_player.sonos_group
Hope someone can help me.
Thanks!
Peter
1 post - 1 participant