I’m on OH2.2 and have the following error in my log:
2018-01-13 22:15:47.937 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Calculate Pool Temp Rate': Unknown variable or command '<'; line 120, column 52, length 48
The relevant line in the rule looks like this:
if (Greenhouse_PoolTemperatureTop.state >= 36 && Greenhouse_PoolTemperatureTop.previousState < 36) {
I suspect that it is the way I use .previousState ? - I cannot find good references to how to use this in rules. Can someone help me on the right track ?
glad to hear, it works.
I don’t use .previousState, because all my persistence-related trigger are either temperatures or other means, which aren’t boolean. And I wanted to have some hysterese - and .averageSince does that sufficiently…
but still - <item>.previousState() … just out of curiosity:
if (Greenhouse_PoolTemperatureTop.state >= 36 && Greenhouse_PoolTemperatureTop.previousState().state < 36) {