From 83512b1faf882fda380ed233f62d895461c3832b Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Sat, 1 May 2021 17:34:13 +0100 Subject: [PATCH] fix simulated sensor --- lib/oven.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/oven.py b/lib/oven.py index adfe692..2d1d795 100644 --- a/lib/oven.py +++ b/lib/oven.py @@ -83,8 +83,9 @@ class TempSensor(threading.Thread): threading.Thread.__init__(self) self.daemon = True self.temperature = 0 + self.bad_percent = 0 self.time_step = config.sensor_time_wait - self.noConnection = self.shortToGround = self.shortToVCC = False + self.noConnection = self.shortToGround = self.shortToVCC = self.unknownError = False class TempSensorSimulated(TempSensor): '''not much here, just need to be able to set the temperature''' @@ -100,7 +101,6 @@ class TempSensorReal(TempSensor): self.bad_count = 0 self.ok_count = 0 self.bad_stamp = 0 - self.bad_percent = 0 if config.max31855: log.info("init MAX31855")