Skip to content

Commit

Permalink
Fix car door lock status (#272)
Browse files Browse the repository at this point in the history
* use carstatus_unlocked information
  • Loading branch information
CM000n authored Jan 5, 2024
1 parent b178acc commit 70526ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mytoyota/models/lock_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ def closed(self) -> Optional[bool]:
@property
def locked(self) -> Optional[bool]:
"""If the door is locked."""
return _get_status(self._status, status="carstatus_locked")
if _get_status(self._status, status="carstatus_locked") is True:
return True
if _get_status(self._status, status="carstatus_unlocked") is False:
return False
else:
return None


class Doors:
Expand Down

0 comments on commit 70526ac

Please sign in to comment.