I’m having trouble using org.joda.time.* with Designer->Rules.
If I try to use any of the org.joda.time.* classes, like this:
var DateTime dt
I get a error in the Designer UI like this:
Couldn’t resolve reference to JvmType ‘DateTime’.
Starting from the ground up, I checked my import statement and it doesn’t give me any UI errors:
import org.joda.time.*
I’m suspecting I may need to take action to add the joda.time jar to the classpath, but can’t find any option in the designer UI to add a library?
Do I need to specifically add the joda.time jar? Or does the Designer automatically do that when I use the import statement?
Here’s my simplest rules file ever, and the last line gives me the UI error “Couldn’t resolve reference to JvmType ‘DateTime’”. I’m probably missing something blatantly obvious, I’d appreciate any pointers.
// import the decimal type as we refer to it in a rule
import org.openhab.core.library.types.DecimalType
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import java.lang.String
import java.lang.Integer
import org.joda.time.*
var Number counter
var DateTime dt