Fix time last full charge

This commit is contained in:
Carsten Schmiemann 2023-06-12 21:13:50 +02:00
parent 724d96bc43
commit fbb528d937
1 changed files with 1 additions and 4 deletions

View File

@ -177,8 +177,6 @@ class DbusBatteryService:
self.ChargedEnergy = 0
self._dbusservice['/History/DischargedEnergy'] = 0
self.DischargedEnergy = 0
dt = datetime.now() - datetime.fromtimestamp( float(self._settings['TimeLastFull']) )
self.dailyResetDone = datetime.now().day
def _update(self):
@ -224,9 +222,8 @@ class DbusBatteryService:
elif (self._bat.soc > 99) and (self.cell_balanced):
self._dbusservice['/Soc'] = 100
self._dbusservice['/ConsumedAmphours'] = 0
# set timestamp last full charge
#if datetime.fromtimestamp(time()).day != datetime.fromtimestamp(float(self._settings['TimeLastFull'])).day:
# self._settings['TimeLastFull'] = time()
self._settings['TimeLastFull'] = time()
if self._bat.NumberInBypass != 0:
self._dbusservice['/Balancing'] = 1