mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-08-09 18:52:40 +02:00
Update __init__.py
Correct datatypes for def F automode to work
This commit is contained in:
@@ -86,9 +86,9 @@ class ONE_WIRE_SENSOR(SensorPassive):
|
|||||||
|
|
||||||
def read(self):
|
def read(self):
|
||||||
if self.get_config_parameter("unit", "C") == "C":
|
if self.get_config_parameter("unit", "C") == "C":
|
||||||
self.data_received(self.t.value)
|
self.data_received(round(self.t.value, 2))
|
||||||
else:
|
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
|
@classmethod
|
||||||
def init_global(self):
|
def init_global(self):
|
||||||
@@ -109,4 +109,4 @@ def set_temp(t):
|
|||||||
@cbpi.initalizer()
|
@cbpi.initalizer()
|
||||||
def init(cbpi):
|
def init(cbpi):
|
||||||
cbpi.app.logger.info("INITIALIZE ONE WIRE MODULE")
|
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')
|
||||||
|
|||||||
Reference in New Issue
Block a user