So I have an automation that says “Patio Door Opened” over the inceling speakers which are connected to a sonos amp. Most of the time this is perfect. But every once in a while all future TTS output doesn’t go to the media_player.living_room to media_player.media_room
I can’t figure out what is going on… why would it just switch to the other one? How to prevent that?
alias: Notification - Patio Door Opened
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.patio
to: "on"
from: "off"
condition: []
action:
- if:
- condition: state
entity_id: media_player.living_room
state: playing
then:
- service: sonos.snapshot
data:
entity_id: media_player.living_room
with_group: false
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.sonos_snapshot_and_resume
- service: media_player.play_media
target:
entity_id: media_player.living_room
data:
media_content_id: media-source://tts/google_translate?message=Patio+Door+Opened
media_content_type: provider
metadata:
title: Patio Door Opened
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/google_translate?message=Patio+Door+Opened
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
enabled: true
- if:
- condition: state
entity_id: input_boolean.sonos_snapshot_and_resume
state: "on"
then:
- service: sonos.restore
data:
entity_id: media_player.living_room
with_group: false
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.sonos_snapshot_and_resume
mode: single