Hi,
Seems I always get a NPE when querying for persistance data where there is none to get, ie.
I have a “gPersistInfluxChange* : strategy = everyChange,everyHour,everyDay” policy on an item.
If I query that item with averageSince:
if (pe.averageSince(ir.getItem("W_Electricthingy"), DateTime.now().minusMinutes(10), "influxdb") > DecimalType(50)):
la.logDebug("DEBUG", "TESTING123: ITS TRUE")
else:
la.logDebug("DEBUG", "TESTING123: ITS FALSE")
It always throws an NPE:
2021-03-31 13:21:19.626 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/test.py’: java.lang.NullPointerException: java.lang.NullPointerException in at line number 57
But it works just fine if there is actual data/measurements to retrieve…
Shouldn’t this return a false/null value instead?
OH: 2.5.12
Influx: 1.8.4