Adding a Dimmer switch ( group? ) in a sub item in a sitemap

I’m sorry If this has already been posted, but I couldn’t find a reference, and it’s driving me nuts…

Working off the demo sitemap, and demo items file, I have a bunch of hue lights. One of the lights has 2 x hue bulbs in it. I ideally want to control both of them together, as it is a single light ( switch ). I was able to create this under the demo sitemap ( Group Demo ), and it works great:

I want it placed here tough, with a dimmer, vs a switch:

Sitemap Home -> First Floor -> Kitchen -> Kitchen Island Light

I can’t figure out how to go about this.

I created the following in the items file:

Group kitchen_isl “Kitchen Island Light”

along with:

Dimmer Light_GF_Kitchen_Island_1 “Kitchen Island Light” (GF_Kitchen, Lights, kitchen_isl) {hue=“3”}
Dimmer Light_GF_Kitchen_Island_2 “Kitchen Island Light 2” (GF_Kitchen, Lights, kitchen_isl) {hue=“5”}

And used the demo sitemap to create the item, but it is not where I want it, ( essentially off the home page, I want it to be in the Kitchen as a slider / dimmer.

Frame label="Demo" {
	Text label="Group Demo" icon="firstfloor" {
		Slider item=kitchen_isl
		Group item=Heating
		Group item=Windows
		Text item=Temperature
	}

I have another light that is defined in that room that works and appears in the sitemap perfectly:

Dimmer Light_GF_Kitchen_Table “Kitchen Ceiling Table Light” (GF_Kitchen, Lights) {hue=“4”}

I simply just want to “Group” the two bulbs together with a slider.

Any help would be appreciated. Thanks

1 Like

Try:

Group:Dimmer kitchen_isl "Kitchen Island Light"

That should make the sitemap treat it as a Dimmer instead of a switch. However, it will use what ever the default controller is defined for a Dimmer. If that default is not a slider you will have to create a proxy Dimmer Item that you put on your sitemap and forward any changes to the proxy to your two actual lights using a rule.

Thanks @rlkoshak I saw a similiar post here:

But got confused very quickly. It seemed somewhat excessive to simply be able just to group two lights. Is there not an easier way? Any ideas on how I might be able to best create the rule and have it appear “elegantly” in my sitemap under kitchen?

Sorry to ask, but when you say proxy Dimmer Item is that a ghost item? Are there examples of this? I still can’t seem to get this to show up properly in the sitemap as a dimmer under:

Sitemap Home -> First Floor -> Kitchen -> Kitchen Island Light

Thanks again.

I think he mean a dummy item that is only use in rules to send command to real items. (you did need to put in on your sitemap)

like
dimmer my_dummy_dimmer

and you make a rule for when the dummy dimmer change,

you send the current value of the dimmer to the 2 real light item that you want to control.

I don’t understand, and apologize. I just want to create a slider item for two light bulbs that are in the same physical light fixture.

I have created the following:

Group:Dimmer kitchen_isl “Kitchen Island Light [(%.1f)]” (GF_Kitchen, Lights, kitchen_isl) {hue=“3,5;brightness;30”}
Dimmer Light_GF_Kitchen_Island_1 “Kitchen Island 1” (GF_Kitchen, Lights, kitchen_isl) {hue=“3;brightness;30”}
Dimmer Light_GF_Kitchen_Island_2 “Kitchen Island 2” (GF_Kitchen, Lights, kitchen_isl) {hue=“5;brightness;30”}

But in the sitemap it shows up as following:

I just want the “Kitchen Island” lights to appear the same as the "Kitchen table " single light.

In the sitemap: I can create this fine in a frame:

The sitemap is very basic, as I’m starting from scratch The Frame for kitchen_isl is just for testing, as I am trying to group it into :

Sitemap Home -> First Floor -> Kitchen -> Kitchen Island Light

sitemap home label=“Home”
{
Frame {
Group item=gFF label=“Second Floor” icon=“firstfloor”
Group item=gGF label=“First Floor” icon=“groundfloor”
Group item=gC label=“Basement” icon=“cellar”
Group item=Outdoor icon=“garden”
}

Frame {

Group item=Lights label=“All lighting” icon=“hue”
}

Frame {

Slider item=kitchen_isl icon=“hue”
}
}

Below is my items file, very similar to the sample items:

Group All
Group gGF (All)
Group gFF (All)
Group gC (All)
Group Outdoor (All)
Group Lights (All)

Group GF_Living “Great Room” (gGF)
Group GF_Kitchen “Kitchen” (gGF)
Group GF_Toilet “Downstairs Bathroom” (gGF)
Group GF_Corridor “Hallway” (gGF)
Group GF_Dining “Dining Room” (gGF)
Group GF_Office “Office” (gGF)
Group GF_Garage_Entry “Garage Entry” (gGF)

Group GC_stairs “Basement Stairs” (gC)
Group GC_play “Basement Play Room” (gC)
Group GC_media “Theater Room” (gC)
Group GC_Utility “Basement Utility Room” (gC)

Group FF_Corridor “Upstairs Hallway” (gFF)
Group FF_Bed “Master Bedroom” (gFF)
Group FF_Ebath “Ensuite Master Bathroom” (gFF)
Group FF_Bath “Upstairs Bathroom” (gFF)
Group FF_Child “Carter’s Bedroom” (gFF)
Group FF_Child2 “Kayda’s Bedroom” (gFF)
Group FF_Spare “Spare Bedroom” (gFF)

/* Lights */

Group:Dimmer kitchen_isl “Kitchen Island Light [(%.1f)]” (GF_Kitchen, Lights, kitchen_isl) {hue=“3,5;brightness;30”}
Dimmer Light_GF_Kitchen_Island_1 “Kitchen Island 1” (GF_Kitchen, Lights, kitchen_isl) {hue=“3;brightness;30”}
Dimmer Light_GF_Kitchen_Island_2 “Kitchen Island 2” (GF_Kitchen, Lights, kitchen_isl) {hue=“5;brightness;30”}

Color Light_GF_Living_Table_1 “Left Table Light” (GF_Living, Lights) {hue=“2”}
Color Light_GF_Living_Table_2 “Right Table Light” (GF_Living, Lights) {hue=“1”}
Color Light_GF_Living_Ceiling “Ceiling Light” (GF_Living, Lights) {hue=“6”}
Dimmer Light_GF_Kitchen_Table “Kitchen Ceiling Table Light” (GF_Kitchen, Lights) {hue=“4”}

Dimmer Light_GF_Garage_Entry “Garage Entry Light” (GF_Garage_Entry, Lights) {hue=“9”}

Dimmer Light_Outdoor_Garage “Garage Light” (Outdoor, Lights) {hue=“10”}

Switch Light_Outdoor_Front_1 “Front Right Light” (Outdoor, Lights) {hue=“8”}
Dimmer Light_Outdoor_Front_2 “Front Left Light” (Outdoor, Lights) {hue=“7”}

I have may bulbs that I would like to group, so any help would be greatly appreciated ( Most of my ligh fixtures accomodate 2 bulbs, and therefor I jsut want to be able to dim them together, but defined in the sitemap ( per room ) ( ie: a dimmer or slider control, vs a switch )

Any help is greatly appreciated.

1 Like

i would do something like that:

in my items files:

Dimmer Light_GF_Kitchen_Island_1 "Kitchen Island 1 [%d %%]" (GF_Kitchen, Lights, kitchen_isl) {hue="3;brightness;30"}
Dimmer Light_GF_Kitchen_Island_2 "Kitchen Island 2 [%d %%]"  (GF_Kitchen, Lights, kitchen_isl) {hue="3;brightness;30"}
Dimmer Light_GF_Kitchen_Island "Kitchen Island [%d %%]" (GF_Kitchen, Lights)

site map example, no need to use Kitchen Island 1 and Kitchen Island 2, i put them there to see what the rule does.

Slider item=Light_GF_Kitchen_Island_1 icon="hue"
Slider item=Light_GF_Kitchen_Island_2 icon="hue"
Slider item=Light_GF_Kitchen_Island icon="hue"

and the rule: kitchen_island_light.rules

import org.openhab.core.library.types.*

rule "Kitchen island sync"
when
    Item Light_GF_Kitchen_Island received command
then
    var value = Light_GF_Kitchen_Island.state as PercentType
    sendCommand(Light_GF_Kitchen_Island_1, value)
    sendCommand(Light_GF_Kitchen_Island_2, value)
end

i test it… that works. you only need to change the Kitchen Island slider.

ps: you can use 3 ` to the beginning and ending of your code to put them in a “code” box.

1 Like

Thank you SO MUCH @samverner777 ! I have been banging my head trying to get this to work! It works great Thank you so much for the help!!!

Out of curiosity, you mentioned: " you can use 3 ` to the beginning and ending of your code to put them in a “code” box."

Was that referring to the rule? What would that do, or be a benefit of? Just curious.

Thanks very much again!

its on the forum. this way your code is easier to read. like that

this is my code  with a big line ********************************************************** voila!

Thank you! Will do that in the future, sorry for the messy post! :smile: Thanks very much again for your help!