I am trying to play an mp3 when on boolean change trigger.
It works but I get with behaviour :
- Sonos group is playing some spotify music
- Input boolean to off
- The automation starts
- The random mp3 starts to play
-
After a second mp3 stops and the original original music is restarting.
media_player.sala is the coordinator and the music and the mp3 should playing an all the sonos.
What is wrong with this?
Thanks
action:
#### SNAPSHOT
- service: sonos.snapshot
data:
entity_id: media_player.sala
with_group: true
##### SETTIAMO IL VOLUME A 40
- service: media_player.volume_set
data:
volume_level: 0.40
target:
entity_id:
- media_player.bagno
- media_player.camera_da_letto
- media_player.cucina
- media_player.sala
- media_player.studio
- service: media_player.play_media
data_template:
entity_id: media_player.sala
media_content_id: "http://192.168.188.68:81/mp3/{{range(1,2) | random}}.mp3"
media_content_type: "music"
- service: sonos.restore
data:
entity_id: media_player.sala
with_group: true