I have either found a bug in the Sonos component or discovered some behaviour which I believe is not expected or desirable.
It is very difficult to pin down precisely what is happening but during the following flow:
- service: media_player.sonos_snapshot
- service: media_player.sonos_unjoin
- service: media_player.volume_set
- service: tts.google_say
- service: media_player.sonos_restore
the state of the media player changes from paused
to playing
and back, three times (that I can see with the naked eye in the States dev tool).
I would expect it to only change to playing
once when it actually starts playing and back to paused
when it has finished.
My guess is that the snapshot
and restore
services are also causing these state changes but that is just a guess based on them being kind of the same action (opposites).
This is important because the way most people stop message clash is to wait for a player to be playing and then wait for it be paused before allowing the script to end.
Is there anyone who can confirm that this either a bug or expected behaviour (so that we can attempt to work around it)?