Selecting multiple groups in a Sitemap

Hi,

I have a simple setup with a couple of rooms with each of them having one light or more, then, what i would like to do is control all lights within a given room. But i have searched around for a while now and can’t find a way to select multiple groups.

Example of what i want to do:

.items file with the items available to control. Note the parent groups for each.

Dimmer RBedroom_Chromecast_Volume "Chromecast Volume" <soundvolume> (gBedroom)
Dimmer RBedroom_Hue_5_Brightness "Ricepaper Light" (gBedroom, gLightDim)
Dimmer RBedroom_Hue_4_Brightness "Wall Light" (gBedroom, gLightDim)
Dimmer ROffice_Hue_7_Brightness "Office Light" (gOffice, gLightDim)

Then, what i want to do is select all the two lights in the gBedroom group, without selecting the light from the office or the chromecast volume control. Something along the lines of the following:

Switch item=AND(gLightDim, gBedroom) label="All lights" mappings=[ON="ON", OFF="OFF"]

item

Group  gBedroom                "all bedroom lights[%s]" <light>
Group  gLightDim                 "all lights[%s]"        <light>
Dimmer RBedroom_Hue_5_Brightness "Ricepaper Light[%s]"   (gBedroom, gLightDim)
Dimmer RBedroom_Hue_4_Brightness "Wall Light[%s]"        (gBedroom, gLightDim)
Dimmer ROffice_Hue_7_Brightness  "Office Light[%s]"      (gOffice,  gLightDim)

sitemap

sitemap tmp label="TMP" {
Group  item=gBedroom
Slider item=gBedroom
Group  item=gLightDim 
}

Sorry, my bad, i forgot to mention there are other items in the gBedroom group, such as a volume slider. Which i guess would also be controlled if i selected the whole group.

Let me just update the original question. :slight_smile:

Just add as much groups as you like, e.g. create a group gBedroomLights. Whenever you want a functional unit, create a group for that purpose. You may also put single items on your sitemap, you are nto restricted to groups.

1 Like
Group  gRooms
Group  gBedroom (gRooms)
Group  gOffice  (gRooms)
Group  gLightDim                  "all lights[%s]"         <light>
Group  gBrLightDim                "all Bedroom lights[%s]" <light>       (gLightDim)
Group  gOfLightDim                "all Office lights[%s]"  <light>       (gLightDim)

Dimmer RBedroom_Chromecast_Volume "Chromecast Volume[%s]"  <soundvolume> (gBedroom)
Dimmer RBedroom_Hue_5_Brightness  "Ricepaper Light[%s]"    <light>       (gBedroom, gBrLightDim)
Dimmer RBedroom_Hue_4_Brightness  "Wall Light[%s]"         <light>       (gBedroom, gBrLightDim)
Dimmer ROffice_Hue_7_Brightness   "Office Light[%s]"       <light>       (gOffice,  gOfLightDim)
sitemap tmp label="TMP" {
Group  item=gRooms
Group  item=gLightDim 
Slider item=gBrLightDim
}
1 Like