-
-
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
Blockly-block "get thing status <variable name>" in a loop throws an error ("things.getThings is not a function") #2670
Comments
/cc @stefan-hoehn |
Before we go on, can you make sure you are using a typed variable like described here: https://www.openhab.org/docs/configuration/blockly/#using-variables |
@stefan-hoehn, I just re-created the variable as a typed variable with the type "Thing name": The error is the same:
What's odd: When I check the generated code, I cannot see the type the variable was defined as (not sure if this should look differently):
|
@stefan-hoehn , thanks a lot for the explanation. So should I close this issue? Or is this one of the cases where restrictions can be applied in blockly, so that the user can't even put blocks together that won't work? |
You actually have a point here. I made that block smarter now:
See the related fix for that. |
Nice. After almost three years of OH I could (indirectly via you) also make a contribution to the actual code. 😃 |
The problem
In blockly, when using the new loop function for things, the block "get of " or "get of <variable name"" works as intended. The block "get thing status however throws an error. Also discussed here: #2562 (comment)
Expected behavior
The way I understood the "get things status " block, if used in a loop, it should produce the same result than the "get of <variable name"-block.
Steps to reproduce
On OH 4.2, execute the following rule:
Your environment
Browser console
Browser network traffic
Additional information
The text was updated successfully, but these errors were encountered: