Combine switch and group

Hi everyone,

I wonder if its possible to combine a group with a switch (or any other sitemap element).
This is what I do as of now:


Switch item=FLOOR_LIGHT label="Licht" icon="light" mappings=[OFF="Aus", ON="An"]
Group label="Licht" item=FLOOR_LIGHT icon="light" {
   Slider item=FLOOR_LIGHT_LEVEL label="Dimmer" icon="light"

But what I really want is a single element in the UI, where I can switch lights on/off and jump into the next page to use the slider (maybe via click on the label instead of the switch). Something like this:

Is there any way to do this?

Best regards,

I tried to find a solution for this some days ago.
So I would also be very interested whether this is possible or not

You cannot have an element that does something (Switch, Setpoint, etc) and a Group. You get either or, not both.

Thanks for your answer. How do you solve this kind of requirements within openhab?

You put them on different rows on the sitemap, use a different UI like HABPanel, or reassess your requirement and figure out if you some other approach would meet your needs (e.g. don’t have the subpanel at all).

Or you can implement the feature yourself and submit it as a PR to the baseline or create an issue and hope one of the developers agrees to implement it.

I should warn though, in this case it could require very significant changes to support having two different types of controls on the same line like this.

I don’t know if i understand you correctly.
You want some items/lights that are assigned to a group be able to be switched on/off via a switch?
That is possible. Otherwise i don’t understand what you want to achieve.

List your items/lights in the item file and place them in a group in brackets “(lights)” for example
the you can define the group like this.

Group:Switch:OR(ON, OFF) lights         "All Lights [(%d)]"

Switch light1 "light 1" (lights) {?binding?}
Switch light2 "light 2" (lights) {?binding?}
Switch light3 "light 3" (lights) {?binding?}

you can the add this to your sitemap:

Switch lights

It this what you want?