st-swanny / smartthings

My smartthings projects
48 stars 128 forks source link

Round temperature to 1 decimal place #1

Closed talz13 closed 8 years ago

talz13 commented 8 years ago

I noticed that my tags were not reflecting changing temperature very well (displayed in degrees F). After digging through the code, I found that the temperature read from the sensor is in C, and rounded to the whole integer value. Since the temperature is only updated if it is different than the last value, this causes degrees F to not register a change less than ~2 degrees.

I changed the code to round to 1 decimal place, so that the F temperature will update for every degree F change.