Hi,
i’m controlling my Sony TV and Sonos through scripts and automation - works fine except for my Sonos speaker, which remains “paused” when triggered.
script.mediacenter_on
Works fine, Sony TV turns on, Sonos turns on, Sonos source is changed to “Line-In” - but the speaker remains “paused”
Already tried to add a scene, which sets the state to “playing” - but the speaker remains “paused”
scene.sonos_play_livingroom
name: Sonos play Livingroom
entities:
#
media_player.eg_buero:
state: paused
#
media_player.eg_wohnen:
state: playing
#
media_player.og_kind_philipp:
state: paused
After that i tried adding an automation, to switch the Sonos speaker depending of my TV turned on - automation fires, but the speaker remains “paused”.
automation.media-player_sonos_source
- alias: Sonos LineIn when BraviaTV On
trigger:
- platform: state
entity_id: media_player.sony_bravia_tv
to: 'playing'
from: 'idle'
- platform: state
entity_id: media_player.sony_bravia_tv
to: 'playing'
from: 'off'
- platform: state
entity_id: media_player.sony_bravia_tv
to: 'on'
from: 'off'
action:
- service: media_player.turn_on
entity_id: media_player.sonos_eg_wohnen
- service: media_player.volume_set
data:
entity_id: media_player.sonos_eg_wohnen
volume_level: 0.2
- service: scene.turn_on
entity_id: scene.sonos_play_livingroom
- service: media_player.select_source
data:
entity_id: media_player.sonos_eg_wohnen
source: Line-in
- service: notify.telegram
data_template:
message: "Sonos LineIn for BraviaTV"
@Vayain since this has been bumped, here’s a few quick tips. Playing line-in on sonos is a little funky because if you think of it, you’re just telling it to select the line-in, not play anything. The post I’ve quoted below will hopefully help.
Also, you are calling the service script.turn_off . There is no such thing for scripts or scenes, because they are just executed immediately, they don’t have an on or off.
Good luck you two, and post any further issues or progress you have here!
I hope you can give me a solution for my problem as well, I try to let an mp3 file play at the sonos when there is movement in the house. It worked for a while however now it stopt working.
This was after an update of home assistant and after I put the whole configuration behind ssl. I rolled back everything but nothing seems to work.