I’m having trouble extracting an integer from a string, and populating a Number item with it. I’m able to trim the string down to the digits I want, but for the life of me I can’t get it into an Integer object.
AzimuthString = "323 degrees 58 arc minutes 40 arc seconds (NW)"
val Number AzimuthNumber = new Integer(transform("REGEX", "([0-9]+) .*", AzimuthString))
results in:
[ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule Solar Azimuth: An error occured during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.LogAction.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null
I’ve also tried Integer::parseInt(string)
without success.
Thanks in advance for your help.