瀏覽代碼

Merge pull request #8 from lalo-uy/patch-3

Update __init__.py
pull/258/head
Juan Pablo Giménez GitHub 5 年之前
父節點
當前提交
13951fc210
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      modules/base_plugins/one_wire/__init__.py

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

@@ -52,7 +52,7 @@ class myThread (threading.Thread):
## Test Mode
if self.sensor_name is None:
return
with open('/sys/bus/w1/devices/w1_bus_master1/%s/w1_slave' % self.sensor_name, 'r') as content_file:
with open('/sys/bus/w1/devices/%s/w1_slave' % self.sensor_name, 'r') as content_file:
content = content_file.read()
if (content.split('\n')[0].split(' ')[11] == "YES"):
temp = float(content.split("=")[-1]) / 1000 # temp in Celcius


Loading…
取消
儲存