- Platform information:
- Hardware: X86/16G_
- OS: _Win10
- Java Runtime Environment: OpenJDK Client VM Zulu11.43+55-CA (build 11.0.9.1+1-LTS, mixed mode)
- openHAB version:OH3
- Issue of the topic: Getting value of Item
- Please post configurations (if applicable):
-
Items configuration
-
Sitemap configuration related to the issue:not relevant
-
Rules code related to the issue:No rules
-
Services configuration related to the issue
-
- If logs where generated please post these here using code fences:
So I’m creating this small script with hysteresis to control temperature in my outdoors fridge (Keeping it from freezing)
Might not be the optimal approach, but that is not so important at this point.
It didn’t seem to work, so I attempted playing a bit with print statements:
Which gave some result:
Third statement is working…, although strange characters are printed after the 27.7
Problem is the “IF” statement wont accept the “get item state” (shown to the right) to be dropped on it.
And if it did allow, I’d probably face issues with the “degC” which the graphic characters probably represent.
Somewhere it’s how to specify float compare not string compare.
What am I missing in this picture?
PS
Wonder what the idea with the first print statement
‘’‘print item(ogs04_FridgeTemp)’’ printing exactly the same is?
PPS
Where is the “Code” button in blocky, as it would be a great way to start JavaScript programming, getting syntax and item names fully right.
Thanks