Fix for thermometers with minValue > 0

Currently app crashes if curValue > (maxValue - minValue)