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*.
/**
* 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) {
case 1:
triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.DOUBLE_PRESSED);
break;
+ case 6:
+ triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.LONG_PRESSED);
+ break;
}
}