Hide Item State for Group Items in Widget


I just started looking into the semantic model and start getting to know its benefits.
I’m now starting with Pages and try to group my equipment.

I’d like to know how I can hide the item state of a group. This results to “NULL” (of course) but it’s displayed anyway and that’s annoying. I tried it with metadata state descriptions but nothing seems to work.

Group Fernseher "Fernseher"  <screen> (gWohnzimmer) ["Television"] {alexa="Endpoint.Speaker"}

Might be a very stupid and easy to answer question but I feel like I’m missing something essential here…

Thanks for your support :slight_smile:

If it’s a Group that doesn’t have an Equipment or Location tag nor does it have an aggregation function to give it a state, why is it in your model in the first place? If it’s never going to have a state and it’s never going to accept commands, you should exclude it from the model. All Items do not need to be a part of the model. It’s OK to have Items and Groups for other stuff too.

If you just want to suppress the NULL part, go to the Group and set the State Description metadata, setting the Pattern to a space.

If you don’t want the Item to be shown but still want it to be part of your model for some inexplicable reason, go to the Item and set the “default list widget” metadata and set the Visibility field to false. You might need to go into the code view and remove the quotes around that “false” if it doesn’t work.

thanks for the answer. The group is an “Equipment” and therefore part of the semantic model. Maybe the definition above was too short. Here again:

Group Fernseher "Fernseher"  <screen> (gWohnzimmer) ["Television"] {alexa="Endpoint.Speaker"}
Switch LG_Power "Power" <switch>  (Fernseher) ["Switch"] {alexa="PowerController.powerState"}
Dimmer LG_Volume "TV Lautstärke" <soundvolume>  (Fernseher)  ["SoundVolume"] {alexa="Speaker.volume" [increment="3"]}

I understood that I could leave out the semantic model for the Switch and the Dimmer. But both are part of the equipment “Fernseher” and so I thought it would be useful to define “Fernseher” as the equipment “Television” because it has a switch and a dimmer as a part of it. And it should be placed in a room (that works and I’m satisfied with it).

However I’ll try to assign an aggregation function to the group “Fernseher” so it will also display the state and I can get rid of the “NULL” value there.

I suppose assigning an aggregation function and leaving out the semantic model for the Switch and the Dimmer item would be considered fine with regards to the semantic model?

Thanks a lot!

You don’t need to put everything into the semantic model. So leaving things out is always an option.

Looking at the screen shot above again notice that it’s the TV Lautstärke Item that’s NULL. The Group is represented by the gray bar labeled “Fernseher”. Setting an aggregation function on that Group isn’t going to remove the NULL. You need to deal with LG_Volume’s state. That’s the Item in that Group that is NULL.

for me it is also unclear, why I can`t give the equipment groupItem a hint how to get the right state from its members.

in my case it is a simple lightbulb equipment

Group Lampe_Arbeitszimmer "Lampe Arbeitzimmer" 
  { alexa="Endpoint.Light" }
Color Licht_Arbeitszimmer_Color "Farbe" 
  { channel="zigbee:device:controller:00158d0002ff39cc:00158D0002FF39CC_1_color",
    alexa="BrightnessController.brightness,PowerController.powerState,ColorController.color" }
Dimmer Licht_Arbeitszimmer_Color_Temp "Farbtemperatur" 
  { channel="zigbee:device:controller:00158d0002ff39cc:00158D0002FF39CC_1_colortemperature",
    alexa="ColorTemperatureController.colorTemperatureInKelvin" }

You can give it a type and use any of the standard Group aggregation functions. It’s a Group like any other.

Typically though, an Equipment or Location Group will have a diverse set of members and there is no aggregation that makes sense since the aggregation functions expect all the members to either be the same, or at least close to the same.

In this case you could probably get away with using Dimmer as the type and MAX or MIN or AVG as the aggregation function since a Color Item can behave like a Dimmer in most cases. But in this case they are not really representing the same concept so even though the Item types are potentially compatible, they mean different things so it doesn’t really make sense to aggregate them.

And even once you’ve done that, it’s not like that Group’s state is ever going to show up in the auto generated UI cards anywhere. The Equipment Group is represented by the gray title bar, That’s it. Only the Point Items are shown in a way that their state is also shown.

1 Like

A bug has been fixed in 3.3M1 so that if you use the after list item configuration setting (available in advanced), the item value (NULL in this case) will no longer be displayed. Therefore, if you just set a space or nothing: “” for this setting, group lines will be cleanly displayed.