-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyphen in template cannot be used in sitemap mapping #2701
Comments
This seems to be a core or ui issue. (I think the latter) who can transfer this issue? @openhab/webui-maintainers |
It’s a UI issue, thanks for the ping. |
@mherwege Can you please take a look? |
I will have a look. Please assign to me. |
The syntax The thing is, I tried with something like: I suspect your syntax will also not work in a So I propose to close this, as this is a configuration issue. |
@mherwege: The sitemap defined with mappings is and was working without a flaw. The issue became apparent only when I switched over to code view. It took me quite a while to establish what was wrong. If this is not a bug, wouldn't it be even better to prevent illegal definition in the Design view. |
And that is exactly what I did in my test above. If the string does not contain a hyphen, the double quotes are not required. If it does, you need to put it in double quotes to make it work. And that is the error it tells you in the code view. |
I understand that the configuration is not correct, but it would be great if one would understand the root cause for the syntax error. As things improved already, probably with 4.2.1, it would be even better if the offending lines would be properly shown. |
I have not been able to do that consistently. The grammer parser generates errors, but these are not always at exactly where it happens. |
Here the grammar parser reports the right location, but the output shows the wrong lines, here just the end of the file. |
We have little control over how Nearly creates that error message unfortunately. Therefore, when I have time I will look into putting checks in the UI to avoid the problem in the first place when creating it from the UI. |
Also see kach/nearley#634 |
Expected Behavior
I am using Fritz!Box Templates to switch between operation modes of the Fritz radiator controller.
I am setting up a sitemap. I would like to configure the mappings in the UI and be able to see the resulting sitemap code under the "Code" tab.
Current Behavior:
The "Code" tab hangs because the hyphen is violating the expected token syntax.
Possible Solution
A fix in openhab-addons or more tolerance in sitemap parsing.
Steps to Reproduce (for Bugs)
Your Environment
The text was updated successfully, but these errors were encountered: