OK, now we are getting somewhere. That Item is a special type of Number Item. It’s a Number Item with Units of Measurement. Units Of Measurement | openHAB
That’s the first key. It’s best when you can compare a UoM to another compatible UoM.
But there is another problem here. You can’t use a comparison in the rule trigger. As written that rule will only ever trigger if the state was literally the string “<=500” and it changed to the literal string “>500”. That’s never going to happen so the rule will never trigger.
What you need is a Condition. That’s what the “but only if…” section is for. There you can compare the state of the Item and only run the rule if it’s over 500 and the previous state was under 500. But as you surmise, you’ll need to add some code. So add a Script Condition. It’s probably easiest to choose Rules DSL for this as it has the best support for UoM.
previousState <= 500 | ppm && newState > 500 | ppm