Help with representation of switches in "Group"

Hi,

I’ve defined several switches in OH 2 for the battery status for my Max! shutter contacts and assigned them to the group “Batteriestatus”:

Group Batteriestatus	"Batteriestatus" <battery>
Switch  Schlafzimmer_Fenster1_Battery "Batterie Schlafzimmerfenster 1 [MAP(max.map):%s]" <battery> (Batteriestatus) { channel="max:shuttercontact:NEQ0897054:LEQ0790848:battery_low" }
Switch Schlafzimmer_Fenster2_Battery "Batterie Schlafzimmerfenster 2 [MAP(max.map):%s]" <battery> (Batteriestatus) { channel="max:shuttercontact:NEQ0897054:LEQ0790893:battery_low" }
...

Because “OFF” means battery is ok and “ON” means battery has to be replaced, I also defined an appropriate “max.map” file:

OFF=ok
ON=leer
NULL=undefiniert
-=undefiniert

Now I want to display the status with my sitemap file:

sitemap zuHause label="Zu Hause"
{
 Group item=Batteriestatus
}

Unfortunately when starting the BasicUI the elements below the Group “Batteriestatus” are still rendered as switches.

When I try

sitemap zuHause label="Zu Hause"
{
 Text item=Schlafzimmer_Fenster1_Battery
 Text item=Schlafzimmer_Fenster2_Battery
}

it is shown as expected:

“Batterie Schlafzimmerfenster 1 ok”
“Batterie Schlafzimmerfenster 2 ok”

What I understand is, that BasicUI renders the items below a group from the initial item type - so in this case “Switch” from my item file to “Switch” in the sitemap file.Right?

Are there any simple ways to enforce in the sitemap file to render the items below a group as “Text items”?

Many thanks in advance for a feedback.

Try

sitemap zuHause label="Zu Hause"
{
 Group item=Batteriestatus
    {
     Text item=Schlafzimmer_Fenster1_Battery
     Text item=Schlafzimmer_Fenster2_Battery
    }
}

:wink:

Thank you - this works! :grin:

But I hoped I can avoid to have to insert each “Text” item manually in the sitemap … :wink:

Well, for individual configuration, you will have to configure individually… :wink:

I really hate this Group “shortcut”, yes, getting nice results in no time, but this leads to expectations, which openHAB can’t satisfy.

To get the full power of openHAB, you will have to configure each item and each widget, but on the other hand, you will see exactly what the sitemap will look like, without a browser…
Using Smarthome Designer will help to avoid some (not all…) errors, and you can hide code hierarchically (e.g. only show the code of the top page).