Sonos binding: add new channel clearqueue #3740
Conversation
Fix #2894 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the "clear queue" channel is using a switch, shouldn't the binding update the state to off
again if the command on
has been received and the queue has been cleared?
I kept the same philosophy as for the other switch channels in the binding like for example the stop channel, we don't care the switch state. |
At least it is consistent then 😄 Makes sense imho. Still I would like to understand whether we are missing something conceptually in the framework, or this binding is modeled in a creative way. Do channels like this indicate a need for "write-only" channels which only accept commands but do not have a state (similar as trigger channels, just that the "event" is going the other way)? How and if to introduce such a channel kind is of course by far beyond this PR and should not be discussed here - I only want to understand this here and I would be fine with it how it is implemented currently. Or is it rather that such a channel actually should be the representation of the device being in "cleanup" state for even a very short-lived moment? Then I'd agree it's weird that it remains in the ON state and should switch off again (consistently, i.e. for all these channels, best in a separate PR again). |
Isn't this already supported by the framework. |
I confirm it is a write only command channel without state representing device state. |
In the Sonos binding you have at least 10 channels of this kind. Sometimes you have another channel that reflects the state. For example, the control channel (player) is indirectly updated when using the stop channel as command. |
So what is the status for this PR ? Maybe a new bug should be declared if you think the Sonos binding have unexpected handling of channels ? |
@SJKA What do you think about. |
As I understand:
And this holds true. No need to change anything here, I really did not intend to block this PR with it. And I'm not even sure whether we need such a dedicated write-only channel kind. Need to make up my mind. And of course, we can discuss it elsewhere. This PR LGTM! |
Can this PR be merged please ? I am waiting for it to implement #3741 that will require changes in the channels file too. |
Oh sorry, yes, sure. |
Just as some random thoughts, before I forget to write them down:
Just my 2 cents for the discussion that might or might not take place "elsewhere" ;-) |
Fix #2894
Signed-off-by: Laurent Garnier lg.hc@free.fr