Latest snapshot doesn't allow Group without Item

I just upgraded my running Openhab2 to the newest snapshot 2.1.0~20170203040910-1 .

I have been using the following syntax successfully for a while now:

Group label="Test" {
    Switch item=Testitem1
    Switch item=Testitem2
}

This gives me the opportunity to group items together which don’t belong to the same group, hence an easy way to create submenus in sitemaps.

Since the latest snapshot all sitemaps using this syntax stopped working; now I can’t define groups without defining an item for them like this:

Group label="Test" item=Testgroup {
    Switch item=Testitem1
    Switch item=Testitem2
}

Why is that? Have I been using groups wrong all the time?
This is the error groups without item definition produce:

 rule ruleGroup failed predicate: {getUnorderedGroupHelper().canLeave(grammarAccess.getGroupAccess().getUnorderedGroup_1())}?

This is a fatal error which stops sitemaps containing such groups from working all together (quite a shock :slight_smile: )

One can assign some dummy items to all groups of course, but I want to understand what lead to this change.

I think so :slight_smile: (based also on: http://docs.openhab.org/configuration/sitemaps.html#element-type-group)
I always define the name of the item group to be presented in my sitemap.

To achieve what you are looking for, you could do (in theory, even Text needs an item name… but it works for me :))

Text label="Test" {
    Switch item=Testitem1
    Switch item=Testitem2
}
2 Likes

Thanks for pointiing that out!

Ah well, one constantly learns, I guess…

Nevertheless it’s strange that my wrong syntax worked pretty well since today :expressionless: |