How Group Items are displayed via UI

Good morning - happy new year to you all!

I’m working on my semantic model (a textual config) and now I’m running into problems…
It’s just a cosmetic issue but I would like to resolve this!

I have multiple lights with two or more bulbs, where each light is grouped together into a group-item to manipulate all bulbs simultaniously. That’s working just fine.

But it seems there’s no way to display these group-items as single bulbs in UI.

Here’s a screenshot to give you an idea what I’m talking about:

there are two lights and I want them to be displayed like the second entry (TV Wand) which is a single item. but I can’t find a way to display the group-item above in the same way…

my textual definitions look like this:

Color        LightTvColor      "TV Wand"        <rgb>   (gLivingroom)  ["LightStripe"] {channel="shelly:shellyrgbw2-color:tv_wall:color#hsb"}
Group:Color  gStandsBulbsColor "Standleuchten"  <rgb>   (gLivingroom)  ["Lightbulb"]  

is there a clue, a different semantic tag or something to display item-groups as single items?

cheers Dan

It’s all to do with the tags you choose.

You’ve given the Group an Equipment tag. The UI looks and sees that the Group is tagged as an Equipment, so it expects it to have members with Point tags. You don’t show this but I suspect your members don’t have any sematic tags at all. So MainUi sees an Equipment with no Points and, parden the pun, showing it would be pointless.

In general you always want to make the Items that can be interacted with tagged with Point/Property tags. So if you add something like Switch, Light or Control, Light as the tags (Point, Property) instead of the Lightbulb Equipment tag that might get you what you want.

Of course doing so will make the Point a Property of the Location which means it is down in the Properties tag on the Locations card and it won’t be down at all on the Equipment tab.

1 Like

Ok, if I get this right, there’s no proper way to display it in the way I want, right?

Is this explained elsewhere in the documentation? I haven’t found an explanation on this…

thanks Dan

meanwhile I will try out some other ways to tag the items…

1 Like

It’s not exactly clear what you want then. I thought chasing to use Point, Property tags would give you what you want. Doing so will give you a row with a list item widget in the Locations card just like your TV Wand Item.

If that’s not what you want then please explain further.

The differences between what the tags mean is covered at a high level in the Getting Started tutorial and I worry write wrote a detailed tutorial at A Deep Dive into the Semantic Model. I also discuss done best practices (among other things) in OH 3 Tips and Tricks.

Just to be clear here, the issue isn’t that you have a Group Item. The issue is you have a Group Item tagged as an Equipment. That has a special meaning in the model. But given what it appears you want to have happen, this Group Item should be tagged with Point, Property tags anyway, even if it were not a Group and were just a Switch or a Color.

The key thing is the distinction between equipment and points. They are but interchangable.

1 Like

Thanks Rich…

I will have a look at the links you provided :wink:

my problem is - I hope I’m able to explain this right - I wan’t this group-item to be displayed in the equipment tab (Geräte) like a normal lightbulb.(see the screenshot) But when I follow your advice to change the tag to “light” instead of “lightbulb” it’s shown in the properties tab (Eigenschaften), and it always shows the little arrow instead of a colorchooser and a switch, like a normal bulb would do. And no matter if I tag the items belonging to the group with “point” or not - it makes no difference at all.

I hope you can understand what I mean - that’s why I’m asking if there’s no proper way to display a group-item as lightbulb equipment, like a normal lightbulb item (without the arrow which points to the grouped items)

in short: I want a group-item displayed as lightbulb under eqipment with the switch and the colorchooser.

Not just light. Notice a Point has two tags. A Point tag which represents what the Item does ( e.g. switch, control, measurement) and way it does it to (e.g light, temperature, etc.)

A property tag cannot exist on it’s own, it must be paired with a Point tag.

If you want the Group Item to appear as a light switch in the model, it must be tagged with a Point and Property tag. If you want it to appear on the Equipment tab of a Location, it must be a member of another Group with an Equipment tag. Otherwise it’s a point/property on the location and appears in the Properties tab of the Location.

It will be something like:

Livigroom: Location tagged Group (Livingroom)
    Lights: Equipment tagged Grouo (Lightbulb )
        gStandsBulbsColor: Point/Property tagged ( Control, Light )
                Individual light bulb items, no semantic tags applied

thanks a ton Rich,

I tried to understand what you wrote and read the two threads, but I think I don’t get this right.

How do I add a second tag to the group in textual config?
I have tried:


I also tried with only one tag at a time…

["Control"] ["Light"]

I’ve tried that, but then the new group is displayed at the location and if I click on it I get to an empty page which says "This group has no members".

I don’t know what I’m doing wrong, sorry, but I think it’s a syntax problem…

this one should work I think, but since I’m in the UI I can’t say for sure.

Perhaps but now you might start to understand why I don’t do. items files any more. The Model is just too hard to get right in .items files. It can be done for sure but it’s gonna be a pain.

Use the API Doc Explorer to see what tags the Items really have. That will confirm whether it’s a tag problem or something else. You might be able to see what you need from the Item’s page. It does the sensation tags there too. But if there is something wrong (e.g. typo) the tag may just but appear. The API should give you more info.

Verify each tag against the list of supported tags also. Case matters.

If it’s composing that the Equipment didn’t have any members, there is likely something wrong with the light Group.

You did make it a member of the Equipment Group?

yes… I understand, and maybe you’re right… sadly the advanced syntax is not well documented - and probably there’s a reason for this I guess… but it’s hard to fight against dev’s decisions. I would like to use my textual config furthermore.

I think I should try this API Doc Explorer and see if I can sniff some information and try to check the items page too :wink:

…and I’ll try [“Control”,“Light”] a second time, maybe a typo?!


ups forgot to answer your question

yes I did

Have you seen this tutorial?

hi @hafniumzinc,

thanks for the link, I’ll have a look at it - never noticed the thread before

Ok it was a typo on my side now both groups are shown, but no change in how the lightgroup is displayed…

Group        gStandsBulbs        "Lights"         <rgb> (gLivingroom)   ["Lightbulb"]
Group:Color  gStandsBulbsColor   "Standleuchten"  <rgb> (gStandsBulbs)  ["Control","Light"]   

I will try to test if I’m able to define a color-group via UI which can be shown like a normal color-item.

But maybe it’s a general problem which could only be fixed by adding a new group type to the model to reflect this type of displaying group-items…

OK, we’ve at least made some progress. Now you want to override how the Item appears. To do this, edit/add Default List Item Metadata and devince the widget how you want it to look and work. Then you will have what you are after.

Once you define the metadata, you can look at the code tab it’s possible to convert the YAML to .items file format.

As with anything, it makes the best guess on how to show it but sometimes gets it wrong, so you can override it.

:see_no_evil: sorry for replying so late. I was sick for the past few days…

I will have to look into this… I’m using the model-generated location cards - do you think it’s possible even then? I will have to look if I can edit these in UI, but I think I haven’t seen any edit option to do so…

Ahh Ok I think I have found something to edit :wink: thanks

I hope you feel better!

Also, look at the Custom Widgets on the Marketplace. If you see one you like you can just install and use it. I think I’m the only one who has posted List Item widgets so far but I expect over time to see more and more. You may not need to edit or create anything at all in many cases. Unfortunately this is a case where you’re forging new ground.

Given that, I’d encourage you to create it as a Custom Widget (under developer tools). Once it works there and you are happy with it, you could post it to the Marketplace and others will be able to benefit too.

For future readers, one controls how an Item appears in the automatically generated cards by applying “Default List Item Widget” metadata to that Item. If you create a custom widget, you can apply that widget over and over instead of needing to recreate it for each Item individually.

1 Like

thanks for asking, yes I feel way better now :wink:

I’ll have to test how I can achieve the best results for my needs… thanks!