Group displaying only open windows

Dear all,

I’m trying to create a group which displays only the items (by name) which fullfil a certain condition. If I’m using the group state aggregation functions, I get everything else (number of items, overall status, etc.). As I want to know which window is open and not how many or if any, could you please help me?

Thx!

Did you have a look at this?

https://docs.openhab.org/configuration/sitemaps.html#visibility

Members of a Group are always members of a Group.

Within a rule, you can iterate through members and select from them e.g. members with a certain state. For example, you could build a text string listing the names of all open windows. That doesn’t change any displays, though.

As Vincent says, for display manipulation you should look at Sitemap. Sitemap offers only limited options using Groups, and showing/hiding members is not one of them. You have to do it the hard way with visibility option, Item by Item

Thx to both of you. The visibility parameter might help, but it looks like I have to copy all my window contacts into the sitemap… (Currently I’m just working with groups).

I have something similar. I use a proxy group which included only the items from the other group which I want to see. This rule is triggered by the status change of the related group.

gContactStatus.removeMember(gContactToChange)
gContactToChange.removeGroupName(gContactStatus.getName())

gContactStatus.addMember(gContactToChange)
gContactToChange.addGroupName(gContactStatus.getName())

This is correct. You have no control what-so-ever over the order or type of element that gets shown on the sitemap when using Groups. All you get are ALL the members of the Group displayed with their default configuration and elements (e.g. a Switch will always show the toggle control).

If you want to have control over how things appear on your sitemap you can’t use Groups and have to put each Item on your sitemap individually.