OH3: Sitemap not allow specific item name

With this Code:

    Frame icon="bedroom" label="ZIMMER" {
        Group icon="bedroom" label="1.OG" item=1OG
        Group icon="bedroom_orange" label="2.OG" item=2OG
        Group icon="bedroom_blue" label="3.OG" item=3OG
        Group icon="bedroom_red" label="4.OG" item=4OG

i get this error message:

Error: Syntax error at line 18 col 49:

          Group icon="bedroom" label="1.OG" item=1OG
Unexpected identifier token: "OG". Instead, I was expecting to see one of the following:

A WS token based on:
    _ β†’ _ ● %WS
    WidgetAttrs β†’ WidgetAttrs ● _ WidgetAttr
    Widget$ebnf$2 β†’ Widget$ebnf$2 ● WidgetAttrs
    Widget β†’ %lwidget _ ● Widget$ebnf$2
    Widgets β†’  ● Widget
    Widget β†’ %lwidget _ Widget$ebnf$3 __ %lbrace __ ● Widgets __ %rbrace
    Widgets β†’ Widgets _ ● Widget
    Sitemap β†’ %sitemap _ SitemapName __ SitemapLabel __ %lbrace _ ● Widgets _ %rbrace
    Main β†’ _ ● Sitemap _

… some solution ideas in the community?

Item names may not begin with a number.

The only characters permitted in an Item name are letters, numbers and the underscore character. Names must not begin with numbers. Spaces and special characters are not permitted.

β€œBut why did it let me use that Item name?” - this is being reviewed

Thank you, this is really annoying; now I have to delete and recreate all items with numbers at the beginning …

Please file an Issue on GitHub. It should not have permitted you to create an Item starting with a number.


is this rule also mandatory for all β€œNAME” within OH3, like thing, channel, rules, scripts …

You’d have to read the docs to find out :wink:

So far as I know,only Item names must not begin with a number. It’s not unreasonable.

There is already an open issue about whether this restriction should be maintained in OH3. Once that decision is clear, then it’s worth putting effort into validators.

What does the documentation indicate? I know it is documented for rules and this forum is not a substitute for RTFM.

Link please?

Post #2 , the issue links in turn to others.

1 Like

Subscribed, thanks