Group Number Count Main-UI

  • Platform information:
    • Hardware: Raspberry Pi 4 4GB
    • OS: openhabian 1.7.4(b)
    • Java Runtime Environment: I don’t know
    • openHAB version: 3.4.0M2 - Milestone Build
  • Issue of the topic: Can’t create a Group:Number:COUNT Item in the Semantic Model

Hello, my English is bad. I use deepl to translate.

How can I create a Group:Number:COUNT item in the Main UI of openHAB. Count is not possible to select.

When I create text items in the items folder such as:

Group:Number:COUNT("OPEN") OpenWindows "Offene Fenster[%d]"
Group:Number:COUNT("CLOSED") CloseWindows "Geschlossene Fenster [%d]".
Group:Number:COUNT("AJAR") AjarWindows "Gekippte Fenster [%d]"

this works fine.

But there is no apparent way to do this in the Main-UI. Or is there?

Thanks

There are a few areas where MainUI doesn’t allow certain things that should be allowed. This may be one of them. But you can get around that by choosing “create item from text definition” and paste in the text above to create the Groups.

Thanks
The Code in the items file is such as:

Group:Number:COUNT("OPEN")     OpenWindowsTest "Offene Fenster [%d]"

This give me a Syntax Error.

Unexpected string token: "OPEN". Instead, I was expecting to see one of the following:

A identifier token based on:
    AggArgs → "(" ● %identifier _ "," _ %identifier ")"
    Type → "Group" %membertype ":" %aggfunc ● AggArgs
    Item →  ● Type _ Name Label Icon Groups Tags Metadata
    Items →  ● Item
    Main → _ ● Items _
A identifier token based on:
    AggArgs → "(" ● %identifier ")"
    Type → "Group" %membertype ":" %aggfunc ● AggArgs
    Item →  ● Type _ Name Label Icon Groups Tags Metadata
    Items →  ● Item
    Main → _ ● Items _

But, I don’t understand this. Can you give me an example of the syntax using my item file?

I think it works without quotation marks. Like this:

Group:Number:COUNT(OPEN) OpenWindowsTest “Offene Fenster [%d]”

But once you have imported you can not change the expression because it is not shown in the mainUI.

By now I think the best way would be if you keep these items file based.

Many Thanks. It works.

Maybe the feature will come in a future version.