Workflow < > <= >= not working as expected

I have a light sensor that measures lux and am trying to create a transition in a workflow when the lux goes below 300. (new < ‘300’).
However this is not performing as expected. It seems that it is only evaluating if the first digit is below or over 3 instead of 300. Here are some examples when transition condition is “new < ‘300’”

lux = 100-300 evaluates as TRUE
lux = 31-99 evaluates as FALSE
lux = 1000-2999 evaluates as TRUE

Am I doing something wrong or is this a bug?

You may be getting tripped up by string versus number comparison. “new” is likely a string, so if you want to do a numeric comparison, you probably want:

tonumber(new) < 300

[quote=“jswim788, post:2, topic:199183”]You may be getting tripped up by string versus number comparison. “new” is likely a string, so if you want to do a numeric comparison, you probably want:

tonumber(new) < 300

Awesome…that was my suspicion as well just didn’t know how to make it a number. Thank you so much for sharing this. I’ll give it a try asap.

Update: That did the trick! Thank you again @jswim788.