Julius-Bendt / homebridge-sonos-player

Apache License 2.0
3 stars 0 forks source link

Improve switch toggle behavior #6

Open Glurz opened 11 months ago

Glurz commented 11 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 5 months ago

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

Glurz commented 5 months ago

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

Glurz commented 5 months 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!

Julius-Bendt commented 4 months ago

Logically then yes, it should. I had to remove some code in the last release to fix another bug. I'll take a look at it, and see if I can figure something out

Julius-Bendt commented 4 months ago

@Glurz this should be fixed in the next release.

Please notice, that the next release will have some configuration changes. I expect to get the release out sunday