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):
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user