Any idea what i’m doing wrong…I have a weather gauge that provides absolute value in mm for the rain. I found 2 threats that solved the issue, tried to do the same but i receive an error. No clue what is wrong as it looks the same as one other rule that works without an error in the logs…
// ***************************************************************************************************
// ***************************************************************************************************
rule "Update NG5 Rain Stats"
when
Item NG5_JeelinkOutsideTX22_Rain received update
then
if (NG5_JeelinkOutsideTX22_Rain.state instanceof DecimalType) {
postUpdate(RainToday, NG5_JeelinkOutsideTX22_Rain.deltaSince(now.withTimeAtStartOfDay, "influxdb"))
postUpdate(Rain_1h, NG5_JeelinkOutsideTX22_Rain.deltaSince(now.minusHours(1), "influxdb"))
}
end
2020-05-16 10:51:17.122 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Update NG5 Rain Stats’: The argument ‘state’ must not be null.
2020-05-16 10:51:21.617 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Update NG5 Rain Stats’: The argument ‘state’ must not be null.
2020-05-16 10:51:26.130 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Update NG5 Rain Stats’: The argument ‘state’ must not be null.
2020-05-16 10:51:30.618 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Update NG5 Rain Stats’: The argument ‘state’ must not be null.