Wrong calculation of humidity
Just found this little issue when playing around with a DS2438 sensor:
'humidity': (((float(self.value) / (float(self.value) - 0.16)) / 0.0062) / (1.0546 - 0.00216 * float(self.value))),
'humidity': ((((float(self.value) / float(self.value)) - 0.16) / 0.0062) / (1.0546 - 0.00216 * float(self.value))),
Hope this helps!
Thanks! We got the calculation from a datasheet of some sort, so we didn't think there would be an error in operator precedence. It's fairly obvious in hindsight! We'll put it in the next update soon.
Hi Tomas, any chance to get this fixed? Seems that I am the only one on planet earth interested in correct humidity values... :wink:
Thank you very much in advance!
Ahh, I thought it had been fixed already.
I'll commit it right away, and create fixed release soon.
This should now be fixed in release 2.0.5d