I try to move from openhab 1 to 2 and get a lot of errors in the new designer. After I changed Unitialized to NULL I get the following error: Couldn’t resolve reference to JvmIdentifiableElement ‘NULL’.
What should I do?
if (Lodge_Temperature_Setpoint == NULL) {
Lodge_Temperature_Setpoint.postUpdate(comfortTemperature)
}
No, having it upper case actually IS correct, because we do not talk about the Java “null” here, but about the defined state NULL - which should be available just like the other states defined here.
Anyhow I doubt that your rule ever worked as expected, because correctly it should be
if (Lodge_Temperature_Setpoint.state == NULL) {
Do you get the error within the Designer or when the runtime executes the rule?
I assume you are using Designer version 0.7.0 - this was BEFORE Undefined has been renamed to NULL.
With a recent 0.8.0-SNAPSHOT build, NULL is correctly resolved and does not show any errors.