Group - How to show as text item?

OpenHAB version: 2.3

I have been using Groups for some time now and find them extremely handy. There is however one issue I can’t wrap my head around:

I have a group gOnlineStatus

Group					gOnlineStatus		"Online Status"					<status>	

I have some items

Switch MediaMachine "MediaMachine" 											<switch> 			(gOnlineStatus)
	{ channel="network:device:MediaMachine:online" }
Switch Hue "Hue Gateway"													<switch>			(gOnlineStatus)
	{ channel="network:device:Hue:online" }

etc, etc, etc

And on my site map I have

	Frame label= "Infrastructure status" visibility=[Display =="5"] {
		Group item=gOnlineStatus 
		Group item=gSonoff label="Sonoff Specific" {
			Group item=gSoftwareLevel
			Group item=gRSSI
			Group item=gLastWill
			Group item=gConnectedtoAP

The items show up on the UI as switches but I want them to be a text item. The only way around this declaring them one by one as a text item which defeats the whole group thing.

What can I do?



You add a [%s] too the label too display the value
Switch "switch [%s] "

EDIT I misunderstood

Have you tried changing the type of the items themselves to String?
What binding are you using?

Defeat the whole Group thing. When you use Group to put Items on your sitemap you have no control over how they get displayed. You can’t control the order, you can’t override the icons, you can’t override the labels, and you can’t control what element they are displayed using.

By default, a Switch will be put on your sitemap with a Toggle control. If you want to override this default behavior you must put each Item on your sitemap individually.

Vincent’s suggestion is another potential approach.

I’ve also started with groups and finally realized as Rich also mentioned that they are not really good for displaying them in the UI
Have a look at the following post. That explains a lot and also is a good start for creating your UI

Thx for all advice, after Rich his design patterns I thougt Groups where the Swiss armyknife but it looks like its not :smiley:

For Rules, yes. For sitemaps, not so much.