How to use color picker for a hue color group

Tags: #<Tag:0x00007f172efe8ed0> #<Tag:0x00007f172efe8cf0> #<Tag:0x00007f172efe89d0>

First of all, thanks to all the developers for creating OH3 - it is really amazing.

I have several Hue spots in the garden and would like to be able to control all spots simultaneously with one color picker through a group item. I have added all the relevant color items to a group gGardenColor.

However, I cannot get the oh:colorpicker to work with the group item gGardenColor.

The approach works fine when using a group for controlling brightness or temperature with a dimmer. In this situation the Members Base Type for the group is set as a dimmer.

But with a group with hue color items I am not sure how the Members Base Type should be set.

Is it possible to control color items with a color picker through a group item? If so, how should the Members Base Type for the group be set?

On a separate note, is it possible to utilize a HSB style color picker in a widget as an alternative to the standard color picker?

The issue stems from the base type as you correctly mention. Basically there is no base type of color and hence the Group has a NULL value. Unfortunately the color picker does not display when there is no value and is where the issue lies.

As a work around, create a dummy Item for controlling the color and give it a value on startup. You can then check for a change on this item and propagate it to the group. If you have multiple HUE color groups then use a naming convention to reduce your coding, such that you put all your color changer items in a separate group and use a rule that runs when a member of that group is changed such as:

logWarn("rule", "[Rule] Color Changer - {}", triggeringItemName)

// remove the 'Changer' from the triggeringItemName
var groupName = triggeringItemName.toString.substring(0, triggeringItemName.toString.length - 7)
logWarn("rule", "[Rule] Sending update to {}", groupName )
sendCommand(groupName, newState.toString)

The color picker is a f7 control and more details are available at Color Picker | Framework7 Documentation. For HSB style you could set the module to hsb-sliders.

Thanks Sunny - highly appreciated!