[SOLVED] Group Switch in a multi layer sitemap


(Wolfgang) #1

Hi all,

I have a 3-spot-lamp in my bedroom and I want to switch all 3 spot with one switch.

When I define the group switch and the 3 members of this group


Group:Switch:AND(ON,OFF) BedroomSwitch  "Bedroom Switch" <switch>

Switch  Bedroom1_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_1:brightness" }
Switch  Bedroom2_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_2:brightness" }
Switch  Bedroom3_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_3:brightness" }

and the Sitemap just to show this group switch “BedroomSwitch”

sitemap home label="Wolfgang-SmartHouse"
{
	Frame
	{
		Switch item=BedroomSwitch	
	}
}

I get a perfectly fine switch symbol that switches my 3 spots in one go as desired.

BedroomSwitch_Button

However I want to define a group structure which reflects all my rooms on the Sitemap.
So I define a group “Bedroom” in the items file and add it to the Sitemap.

I also add the “BedroomSwitch” to the group “Bedroom” like


Group Bedroom       "Bedroom"  <bedroom>

Group:Switch:AND(ON,OFF) BedroomSwitch  "Bedroom Switch" <switch> (Bedroom)

Switch  Bedroom1_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_1:brightness" }
Switch  Bedroom2_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_2:brightness" }
Switch  Bedroom3_Toggle (BedroomSwitch)      { channel="hue:0100:1:bedroom_bulb_3:brightness" }

and just add the top layer group “Bedroom” to the Sitemap

sitemap home label="Wolfgang-SmartHouse"
{
	Frame
	{
		Group item=Bedroom label="Bedroom" icon="bedroom" 
	}
}

I get my top laywer “Bedroom” which has an arrow to the next layer on which Iwant to see the Bedroom Switch.

Bedroom

and on the next layer I see the switch but not with a switch button as in the example before

BedroomSwitch_Arrow

It has an arrow instead which brings me to a layewr with the 3 single switches

Singe%20Switches

What do I need to change to have the “ON/OFF” symbol against the Bedroom Switch and not the arrow to the single switches’ layer?


(Rossko57) #2

Spot the difference between your sitemap lines ?
Switch item=BedroomSwitch
Group item=Bedroom


(Wolfgang) #3

I have reworded the above text.

The first example is just to try whether the group switch works and it does work.

In the second example I want to integrate the group switch into a room structure (with Bedroom being my first room), which the Sitemap does automatically. But it gives this switch an arrow and not a button.


(Vincent Regaud) #4

The groups are great in the rules and for charting but not in the UIs
By using groups in the UI, you loose control on how the “children” are displayed, in which order, mappings…

Enumerate your items:

sitemap home label="Wolfgang-SmartHouse"
{
    Frame {
        Text item=Bedroom label="Bedroom" icon="bedroom" {
            Switch item=BedroomSwitch
	}
    }
}

(Wolfgang) #5

Merci Vincent,

that did the job.


(Vincent Regaud) #6

Please tick and like the solution post, thanks


(Wolfgang) #7

Done and again learned something :grinning: