Get items defined in sitemap into subgroup instead

Tags: #<Tag:0x00007f61733dc148> #<Tag:0x00007f61733e3e70>

I have the following in my items file:

Group JointSpace

/* MarvellTvVolume */
Dimmer MarvellTvVolume        "Volume TV [%d %%]"      <slider>       (JointSpace) {jointspace="*:volume, POLL:volume"}
Switch MarvellMuteSwitch    "Mute TV Volume"         <settings>     (JointSpace) {jointspace="ON:key.Mute, OFF:key.Mute, POLL:volume.mute"}
Switch VolumeUpDown            "VolumeUpDown"             <slider>    (JointSpace) {jointspace="ON:key.VolumeUp, OFF:key.VolumeDown"}

/* Source selection */
Number Tv_Source            "Tv Source"             <sofa>            {jointspace="*:key.Source"}
Number Ambilight_mode       "Ambilight Mode"        <ambilight>      {jointspace="0:ambilight.mode.internal, 1:ambilight.mode.manual, 2:ambilight.mode.expert"}

In my sitemap file, I have the following:

sitemap demo label="My Demo"
{
    Frame label="Test" {
        Group item=JointSpace    label="Philips jointSpace"    icon="jointspace"

        Switch item=Tv_Source         label="TV Source Selection" mappings=[1=TV, 2=HDMI_1, 3=HDMI_2]
        Switch item=Ambilight_mode     label="TV Ambi Mode"        mappings=[0=Internal, 1=Manual, 2=Expert]
    }
}

I can perfectly put the first 3 items of the .items file in the subgroup “JointSpace” by adding the group as part of the item.

However, would like to have the 2 last items in the .sitemap file also to appear in the subgroup “JointSpace”. I’ve tried different things (like for instance adding “(JointSpace)” in the item line in .sitemap), but I’m not succeeding in getting the two items into the JointSpace subgroup.

What am I doing wrong?

You have to add the Items to the JointSpace group in your Items file, not the sitemap.

Number Tv_Source            "Tv Source"             <sofa>        (JointSpace)    {jointspace="*:key.Source"}
Number Ambilight_mode       "Ambilight Mode"        <ambilight>   (JointSpace)    {jointspace="0:ambilight.mode.internal, 1:ambilight.mode.manual, 2:ambilight.mode.expert"}

If you want to have the Items appear in the same frame on the sitemap without actually adding them to the Group (perhaps you have some rule that operates on the Group) you have to use a Frame as you are but list the items in the JointSpace group individually.

sitemap demo label="My Demo"
{
    Frame label="Test" {
        Slider item=MarvellTvVolume
        Switch item=MarvellMuteSwitch
        Switch item=VolumeUpDown

        Switch item=Tv_Source         label="TV Source Selection" mappings=[1=TV, 2=HDMI_1, 3=HDMI_2]
        Switch item=Ambilight_mode     label="TV Ambi Mode"        mappings=[0=Internal, 1=Manual, 2=Expert]
    }
}

Alternately, you can create a second group which combines all the items for purposes of putting on your sitemal.

Items:

Group JointSpace
Group JointSpaceSitemap

Dimmer MarvellTvVolume "Volume TV [%d %%]" <Slider (JointSpace, JointSpaceSitemap) ...

Number Tv_Source "Tv Source" <sofa> (JointSpaceSitemap) ...

Sitemap:

sitemap demo label="My Demo"
{
    Frame label="Test" {
        Group item=JointSpaceSitemap label=-"Philips jointspace" icon="jointspace"
    }
}

I already applied your first proposal. Works fine, thanks.

Hi,

my intention is similar but still I cannot get it to work:
I would like to have several frames (groups and items) on a sub page like Frame/Group generates.
Maybe you could call it nested groups.

Like this:
Homepage shows:
1F
GF
BM

Clicking on 1F shows:
Frame Lights
Frame Windows (even better: click opens the group Windows)
Frame Temperatures

Thank you for pointing me at any example.

1 Like