Could you give us a little bit more detail regarding what you are automating? How/why are you checking that a number is within a range? What logic is it driving? Maybe we can come up with a nice solution together.
We have this example from another member of the community, who wanted to turn on a light when the UV index was within a range, it might give you some ideas :