浏览代码

Update __init__.py

Correct datatypes for def F automode to work
tags/3.1_alpha
alexpalmer GitHub 8 年前
父节点
当前提交
c77fff6ffa
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      modules/base_plugins/one_wire/__init__.py

+ 3
- 3
modules/base_plugins/one_wire/__init__.py 查看文件

@@ -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')

正在加载...
取消
保存