- Platform information:
- Hardware: X86/16G_
- OS: _Win10
- Java Runtime Environment: OpenJDK Client VM Zulu11.43+55-CA (build 188.8.131.52+1-LTS, mixed mode)
- openHAB version:OH3
- Issue of the topic: Getting value of Item
- Please post configurations (if applicable):
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?
Wonder what the idea with the first print statement
‘’‘print item(ogs04_FridgeTemp)’’ printing exactly the same is?