Skip to content

Commit

Permalink
Handle case when door is opened and cable is locked.
Browse files Browse the repository at this point in the history
  • Loading branch information
ultratoto14 committed Oct 11, 2018
1 parent 9bc21c6 commit cb79274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslajsonpy/Lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def update(self):
self._controller.update(self._id)
data = self._controller.get_charging_params(self._id)
if data and (time.time() - self.__manual_update_time > 60):
self.__lock_state = not data['charge_port_door_open']
self.__lock_state = not ((data['charge_port_door_open']) and (data['charge_port_door_open']) and (data['charge_port_latch'] != 'Engaged'))

def lock(self):
if not self.__lock_state:
Expand Down

0 comments on commit cb79274

Please sign in to comment.