Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nanoleaf] Add LONG_PRESSED tap detection #13865

Merged
merged 2 commits into from Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions bundles/org.openhab.binding.nanoleaf/README.md
Expand Up @@ -156,10 +156,10 @@ The controller bridge has the following channels:

A lightpanel thing has the following channels:

| Channel | Type | Description | Read Only |
|---------------------|-----------|----------------------------------------------------------------------------------------------------------|-----------|
| color | Color | Color of the individual light panel | No |
| tap | Trigger | [Canvas / Shapes Only] Sends events of gestures. SHORT_PRESSED and DOUBLE_PRESSED events are supported. | Yes |
| Channel | Type | Description | Read Only |
|---------------------|-----------|-----------------------------------------------------------------------------------------------------------------------|-----------|
| color | Color | Color of the individual light panel | No |
| tap | Trigger | [Canvas / Shapes Only] Sends events of gestures. SHORT_PRESSED, LONG_PRESSED and DOUBLE_PRESSED events are supported. | Yes |

The color channels support full color control with hue, saturation and brightness values.
For example, brightness of *all* panels at once can be controlled by defining a dimmer item for the color channel of the *controller thing*.
Expand Down
Expand Up @@ -270,7 +270,7 @@ public void updatePanelColorChannel() {
/**
* Apply the gesture to the panel
*
* @param gesture Only 0=single tap and 1=double tap are supported
* @param gesture Only 0=single tap, 1=double tap and 6=long press are supported
*/
public void updatePanelGesture(int gesture) {
switch (gesture) {
Expand All @@ -280,6 +280,9 @@ public void updatePanelGesture(int gesture) {
case 1:
triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.DOUBLE_PRESSED);
break;
case 6:
stefan-hoehn marked this conversation as resolved.
Show resolved Hide resolved
triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.LONG_PRESSED);
break;
}
}

Expand Down