after updating to 2.1 I have a problem with the following rule:
rule "Temperature to high"
when
Item TEMP_CORRIDOR changed to > 25
then
sendTelegram(“bot1”, “Temperature in corridor higher then 25”)
end
Here is the error:
2017-07-09 17:37:02.461 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘corridor.rules’ has errors, therefore ignoring it: [16,35]: no viable alternative at input ‘>’
You cannot do this as a trigger condition in a rule. You will have to simply trigger on “changed”, and then write an if-statement testing for the condition that you want.
Something like this should do the trick:
rule "Temperature to high"
when
Item TEMP_CORRIDOR changed
then
if TEMP_CORRIDOR.state > 25 {
sendTelegram("bot1", "Temperature in corridor higher then 25")
}
end
rule "Temperature to high"
when
Item TEMP_CORRIDOR changed
then
if (TEMP_CORRIDOR.state > 25) {
sendTelegram("bot1", "Temperature in corridor higher then 25")
}
end