hobaka
(hobaka)
April 9, 2021, 8:08am
#1
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?
rossko57
(Rossko57)
April 9, 2021, 8:29am
#2
hobaka:
item=1OG
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
opened 04:02PM - 15 Mar 21 UTC
Hi everyone,
I would like to get some generic clarification for the valid usage of Numbers in Item names.
Reason for this is...
hobaka
(hobaka)
April 9, 2021, 8:49am
#3
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.
hobaka
(hobaka)
April 9, 2021, 10:32am
#5
btw.
is this rule also mandatory for all βNAMEβ within OH3, like thing, channel, rules, scripts β¦
rossko57
(Rossko57)
April 9, 2021, 10:36am
#6
Youβd have to read the docs to find out
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.
hobaka:
is this rule also mandatory for all βNAMEβ within OH3, like thing, channel, rules, scripts β¦
What does the documentation indicate? I know it is documented for rules and this forum is not a substitute for RTFM.
Link please?
rossko57
(Rossko57)
April 9, 2021, 11:11am
#8
Post #2 , the issue links in turn to others.
1 Like