trigger channel events for ON/OFF#936
Conversation
|
This is a sample rule to listen to `SINGLE_ON: |
19a6e78 to
79b4e87
Compare
|
Sorry I've been travelling a lot over the past few weeks so have had little time to look at this. I've really only had a quick look over this, but are you aware of the existing button event functions for remotes etc? I'm wondering if we shouldn't be extending that if necessary rather than coming up with these special on/off, or level event handlers. Where do we stop with this? We could end up duplicating this for a bunch more clusters which feels a bit strange given that the events are the same. I'm just wondering if we really need this functionality, then can we make it generic like the existing events? I'm also not so keen on the binding generating derived events (such as the multi press events), but if we can find a nice way to make it generic it would be better and it might be ok. |
No need to be sorry, we are all doing this on our free time.
Yes, i was aware of these, but the dimmer has two buttons, so i need a way to add more payload to the events.
I could drop the This would still allow to:
|
79b4e87 to
ed5ce14
Compare
|
I have now simplified the events, there are only two new channels for dimmers and the existing events are used instead of defining new once. So i hope this get's closer to a potential merge :D |
ed5ce14 to
bc6ef3e
Compare
|
I have found a way to only use one event channel for both buttons and updated the PR, see the updated README.md for details. |
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
bc6ef3e to
2ccba6a
Compare
This PR will add support for channel events to the new
Level Control EventsandSwitch Eventschannels.Allowing to create rules triggered everytime a button on a
Level ControlorSwitchignoring the state of the channel.To have trigger different rules depending on the times the button is pressed there are the following events supported:
SINGLE_ON: PressedOnonce within a short timeDOUBLE_ON: PressedOntwice within a short timeTRIPLE_ON: PressedOnthrice within a short timeSINGLE_OFF: PressedOffonce within a short timeDOUBLE_OFF: PressedOfftwice within a short timeTRIPLE_OFF: PressedOffthrice within a short timeSINGLE_TOGGLE: PressedToggleonce within a short timeDOUBLE_TOGGLE: PressedToggletwice within a short timeTRIPLE_TOGGLE: PressedTogglethrice within a short timeThis has been tested with a
IKEA RODRET.