Fixed telemeter rendering

This commit is contained in:
Mark Qvist 2023-10-30 20:16:33 +01:00
parent 45822e5aec
commit 08e112f538
1 changed files with 5 additions and 6 deletions

View File

@ -183,12 +183,11 @@ class Sensor():
@property @property
def data(self): def data(self):
if not self.synthesized: if self._data == None or (not self.synthesized and (self._stale_time != None and time.time() > self.last_update+self._stale_time)):
if self._data == None or (self._stale_time != None and time.time() > self.last_update+self._stale_time): try:
try: self.update_data()
self.update_data() except:
except: pass
pass
self.last_read = time.time() self.last_read = time.time()
return self._data return self._data