etheralm / libpurecool

Python library for dyson devices.
Other
68 stars 30 forks source link

Improve C->K conversion accuracy #10

Closed jason0x43 closed 4 years ago

jason0x43 commented 4 years ago

Handle conversions of floating point temperatures. The current code drops the fractional part of a Celsius temperature before making the conversion to Kelvin. This is a problem when converting from F->C->K, because the F->C conversion is likely to end up with a floating point value. When the fractional part is dropped, multiple F temperatures will end up mapping to the same K temperature.

etheralm commented 4 years ago

Good catch, thank you. Everything looks fine, I'm merging this.