a4refillpad / Xiaomi

my Xiaomi Device Handlers for Smartthings
Apache License 2.0
248 stars 1.85k forks source link

typo in xiaomi-temperature-humidity-sensor.src/xiaomi-temperature-humidity-sensor.groovy #8

Open elfman03 opened 6 years ago

elfman03 commented 6 years ago

In the Farenheight section of parsing values there is a typo:

        if (tempOffset) {
            return (Math.round(value * 90/5))/10 + 32 + offset as Float
        }

should be

        if (tempOffset) {
            return (Math.round(value * 90/5))/10 + 32 + tempOffset as Float
        }

the original phrase results in a null issue because "offset" doesn't exist. The Celsius path looks correct.