Skip to content

Commit

Permalink
allow to resume session when still connected
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Feb 22, 2023
1 parent 5481cdb commit f9e1099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vwsfriend/vwsfriend/agents/charge_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, session, vehicle, privacy):
ChargingStatus.ChargingState.DISCHARGING):
chargingSession = session.query(ChargingSession).filter(and_(ChargingSession.vehicle == vehicle, ChargingSession.started.isnot(None))
).order_by(ChargingSession.started.desc()).first()
if chargingSession is not None and not chargingSession.isClosed():
if chargingSession is not None and not chargingSession.isConnectedState():
self.chargingSession = chargingSession
LOG.info('Vehicle is charging and an open charging session entry was found in the database. This session will be continued.')
else:
Expand Down

0 comments on commit f9e1099

Please sign in to comment.