Not if you are dealing with units of measurement. Even in Rules DSL you have to deal with that differently, ultimately calling .floatValue() or converting the value you are doing math with to a QuantityType with proper units too.
And you can do the same in JS Scripting too.
If it’s just a plain old number, JS itself is smart enough to recognize when you have the String representation of a number and do the conversion to number for you.
The vast majority of the time, the string version of the state will work exactly as you need it to work. The only two exceptions are quantity types and datetime types.
I have a beginners Issue which I suppose is not related to 3.3, thus I posted a dedicated discussion thread here.
However I am using the latest image from docker hub (3.3.0-snapshot-alpine from Today (April 27th)) which for the sake of completeness I post this here as well, just in case it could be a version-related Issue after all.
Using the latest snapshot-alpine in docker works but for the go-e charger binding. The already created things work and all linked items also but I can’t create new things (“No thing types can be added with this binding.”):
After migrating to 3.3.0M4, there was an error in the log that a rule failed and after a little investigation, it appears that the marketplace Blockly Date and Time extension that I had added was removed in the migration, and I can’t add it in the marketplace.
I’ve seen it in other context. When you use a registry infrastructure there is an implicit dependency on a “managed provider” which is capable of removing elements. In other words, if you see this error it means that you try to remove an element but there is no known managed provider which is capable of dropping a given element.
There is a logic in PR which does that:
If you see such error it means that condition was not satisfied and you ended up with miss-interpreted provider which is managed, but not detected as one.
Thanks for the analysis. I tried to implement that, but unfortunately UIComponentProvider is in an internal package. I guess we should move it, so the specific provider can live in the habpanel project instead of the core project.
After upgrading from M3 to 3.3.0 M4 some of my Jython rules are not loading.
All Jython files having
from core.actions import NotificationAction
2022-05-02 18:06:44.753 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab/automation/jsr223/python/personal/heating.py': AttributeError: 'NoneType' object has no attribute 'actionClass' in /etc/openhab/automation/jsr223/python/personal/heating.py at line number 1
and none of the rules in that file load.
I have tried moving the import further down in the file, but this doesn’t help.
It also fails with
from core.actions import ScriptExecution
from core.actions import PersistenceExtensions