Merge pull request #24 from alexpalmer/patch-1

Update __init__.py
This commit is contained in:
Manuel83
2017-06-18 21:22:34 +02:00
committed by GitHub
+3 -3
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):
@@ -109,4 +109,4 @@ def set_temp(t):
@cbpi.initalizer()
def init(cbpi):
cbpi.app.logger.info("INITIALIZE ONE WIRE MODULE")
cbpi.app.register_blueprint(blueprint, url_prefix='/api/one_wire')
cbpi.app.register_blueprint(blueprint, url_prefix='/api/one_wire')