Julius-Bendt / homebridge-sonos-player

Apache License 2.0
3 stars 0 forks source link

Improve switch toggle behavior #6

Open Glurz opened 6 months ago

Glurz commented 6 months ago

I don't quite understand the current toggle behavior of the switch. It stays "on" indefinitely. I'd expect the switch to automatically toggle to "off" once the sound has finished playing (or the configured delay has elapsed). The Sonos device should then go back to whatever has been playing before. If nothing has been playing before, it should play nothing again (and not start the current playlist). Thanks @Julius-Bendt for your work so far. Feel free to ignore my requests. ;)

Julius-Bendt commented 1 week ago

Hi @Glurz, I think i fixed the bug. I can't replicate it anymore, at least. Sorry for the long wait!

Glurz commented 1 week ago

Hi @Julius-Bendt Thanks for checking this. At first glance, it seems to work! Thanks.

Glurz commented 1 week ago

Hi @Julius-Bendt

I don't know if it's a regression introduced with the latest fix but I noticed the following behavior: The sound I'm playing as a notification is around 20 seconds. I set the timeout value to 5 seconds. After 5 seconds, the switch toggle goes to off again (which is expected), but the sound continues to play for the entire 20 seconds. Shouldn't it stop after the configured timeout of 5 seconds?

Thanks!