Update __init__.py

Correct datatypes for def F automode to work
This commit is contained in:
alexpalmer
2017-06-17 22:07:35 -04:00
committed by GitHub
parent bcd07e4705
commit c77fff6ffa
+2 -2
View File
@@ -86,9 +86,9 @@ class ONE_WIRE_SENSOR(SensorPassive):
def read(self):
if self.get_config_parameter("unit", "C") == "C":
self.data_received(self.t.value)
self.data_received(round(self.t.value, 2))
else:
self.data_received(format(9.0 / 5.0 * self.t.value + 32, '.2f'))
self.data_received(round(9.0 / 5.0 * self.t.value + 32, 2))
@classmethod
def init_global(self):