alda1
(Alex Needle)
1
in the rule I have this if:
val avg = ModbusPVPower850_ValueasNumber.averageSince(now.minusMinutes(5))
if (avg < 2500) {
Relay_2_status.postUpdate(avg.toString)
}
Problem is, that this isn’t working
if I will do only this without if:
Relay_2_status.postUpdate(avg.toString)
it’s working, so problem must be in if declaration, but don’t know which
rossko57
(Rossko57)
2
I suppose you could use logInfo()
to find out what avg
is - might there be a unit as part of it?
alda1
(Alex Needle)
3
ok, let me chek later, now I don’t have a access to the terminal.
alda1
(Alex Needle)
4
ok, I found it :
val PV_average = ModbusPVPower850_ValueasNumber.averageSince(now.minusMinutes(5)) as Number
now it works