Hey there,
I have 4 Sonos speakers at home
- Arc and sub (living room)
- 2 Ikea shelf speaker Gen2 (bathroom and kitchen)
- 1 Ikea Lamp Sonos thing (Bedroom)
I wrote with pyscript an wakeup light automation that should also play some audio on the bedroom speaker. The bug that I’m having is that if I don’t play something on the Bedroom speaker in the evening, then in the morning the audio is playing either in the kitchen or in bathroom.
- All devices have Fixed IPs
- the bug carried over after a home network rebuild (new DHCP Server, New Wifi)
- the bug carried over after removing and resting all the speakers
- (edit) if I use the mediaplayer on the web interface and select the bedroom speaker, the audio is played back on the select speaker (for example the bedroom)
the code:
media_player.unjoin(entity_id=speaker)
media_player.volume_set(entity_id=speaker, volume_level=from_volume)
media_player.play_media(entity_id=speaker, media_content_id=media_file ,media_content_type='music')
any Ideas?