Fix crash on 100%SoC

This commit is contained in:
Carsten Schmiemann 2023-06-13 20:09:10 +02:00
parent f6de481fa1
commit 94d0308da5
1 changed files with 2 additions and 2 deletions

View File

@ -183,8 +183,8 @@ class DbusBatteryService:
self.dailyResetDone = datetime.now().day
def _update(self):
time = datetime.now()
self.lastUpdated = time.timestamp()
timeLastUpdate = datetime.now()
self.lastUpdated = timeLastUpdate.timestamp()
## Monitor communication ##
if (self._bat.updated != -1 and self.lastUpdated == 0) or ((self.lastUpdated - self._bat.updated) < 10):