Mercurial > templog
comparison py/sensor_ds18b20.py @ 299:358c50004679
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 27 Feb 2017 23:20:07 +0800 |
parents | 20c89630be6c |
children | 97d99eb42d27 |
comparison
equal
deleted
inserted
replaced
286:61269311ed3d | 299:358c50004679 |
---|---|
86 contents = f.read() | 86 contents = f.read() |
87 if 'not found' in contents: | 87 if 'not found' in contents: |
88 E("No W1 sensors found") | 88 E("No W1 sensors found") |
89 return [] | 89 return [] |
90 names = contents.split() | 90 names = contents.split() |
91 # only ds18b20 | |
92 names = [n for n in names if n.startswith('28-')] | |
91 return names | 93 return names |
92 | 94 |
93 def wort_name(self): | 95 def wort_name(self): |
94 return config.WORT_NAME | 96 return config.WORT_NAME |
95 | 97 |