Node-RED as a rule/script engine for openHAB

You will need check if the numbers is as string or number.

Sample of a string number : “1”
Sample of a number number : 1
One trick to make sure that the payload is a number before you compare is to multiply by 1
So in a function it will look like this.
var dat1 = msg.payload*1 ;
if (dat1 < 0){
var msg1 = {payload:“It is below 0”};
}else{
var msg1 = {payload:“It is above 0”};
}
I assume that there will be a easier method to do this but it is one option.
You can also post you flow from node red then we could have a look at it.