diff --git a/sensors.py b/sensors.py index d79d48b..63e7aaf 100644 --- a/sensors.py +++ b/sensors.py @@ -32,12 +32,13 @@ class Temperature1W(Sensor): def read(self): with open(self.path(), "r") as f: content = f.readlines() + time = perf_counter() if len(content) < 2: return None if content[0].strip()[-3:] != "YES": print("INVALID CHECKSUM") return None - return int(re.search("t=([0-9]+)", content[1]).group(1)) / 1000.0 + return (time, int(re.search("t=([0-9]+)", content[1]).group(1)) / 1000.0) class Sensors(): def __init__(self, history=2621440):