If there is one thing I only have problems with then it’s variable types in rules.
I wish there was a simple inspect method that shoes the variable type.
Can anyone tell me how to properly cast this to something that I can compare (<=, etc)?
var pwr = mydevice.state as DecimalType Could not cast 94.12 W to org.eclipse.smarthome.core.library.types.DecimalType; line 251, column 13, length 76
I thought that at some point I got a debug output saying it’s a NumberItem, if I use as Number then I get:
An error occurred during the script execution: index=1, size=1