You can't... tempHandler (in your example) does the compare.
Recognize that the device itself has no clue about your desire to test the value.. it will send it anyway and the hub will receive it and turn it into an Event. So you're not saving anything with your concept.
Are you calling initialize() anywhere? That's not a standard app method (common as it may be) and will only be called if you call it from somewhere. Put a log.debug or something in there to see for sure. Even better, use that to print the value of temperatureMeasurement to make sure that's actually set like you think it is, too.
I have it just like that. The subscribes are in my initialize function. log.debug shows its running through initialize loop just fine at app start and hitting done. I think the issue is in:
subscribe(temperatureMeasurement, "temperature", tempHandler)
specifically the "temperature" part. Whats supposed to makes it go to the handler since its not a State, just a value change?
This should be the attribute (event name), where "temperature" is correct. For the OP, maybe working this down to a minimal example that demonstrates the problem will help. Perhaps someone can find it for you after doing that; or often, people will find it themselves when they take other complications out of the picture.