Group not counting

Hello,

i actually got the problem, that a group is not countign right:

Group:Number:COUNT("ON|OPEN|TILTED")    Home_Fenster "Fenster offen [%d]" <window> (Home_Status) { stateDescription=""[options="ON=auf,OFF=zu"] }

Group:Number:COUNT("ON|OPEN|TILTED")    Group_Badezimmer_Fenster "Fenster Badezimmer [%d]" <window> (Home_Fenster, BZ_Klima) { stateDescription=""[options="ON=auf,OFF=zu"] }
......

Switch      HM_BZ_Fenster_L_Open    "Fenster BZ L"          <window>    (BZ_Fenster_L, Group_Badezimmer_Fenster)
Switch      HM_BZ_Fenster_R_Open    "Fenster BZ R"          <window>    (BZ_Fenster_R, Group_Badezimmer_Fenster)
.....

Any ideas, why group home_fenster is not counting the open window from bathroom?

Thanks,
Alex

Do all Items have a valid state? Are the Items of different types? If all are of type Switch, use COUNT("ON") instead.

Acutally all of the items in the “sub groups” are switches, but want to switch in near future to contacts so i can forego a additional rule (one of the windows has another sensor wit the states open, tilted and closed).

The items all have a valid state an the group “Fenster Badezimmer” is counting right - but the one open window is not counted in the group above.

i could solve it by myself - i defined the wrong group type:

Group:Number:SUM works fine!

No, SUM is not correct :slight_smile:

And to be clear… a contact Item has only two valid states, which are OPEN and CLOSED. TILTED is no valid state of a contact Item.

Why isnt SUM correct? At my tests i adds all the values (open windows) of each room (sub groups).

You are right - the channel of the sensor is called contact, but in openhab its a string item.

It’s simply the wrong naming then, as the channel is a string channel, not a contact channel.

Ahh…!
That detail wasn’t part of the question above… if you are using a group with other Group:Number Items in it (which have the contacts as members), then SUM is correct for this group.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.