Skip to content

Commit

Permalink
fix: fix forced wake up in initial update
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jan 24, 2020
1 parent 08d6961 commit 0892b91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions teslajsonpy/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ async def update(self, car_id=None, wake_if_asleep=False, force=False):
continue
async with self.__lock[vin]:
if (
online
(online or wake_if_asleep)
and ( # pylint: disable=too-many-boolean-expressions
self.__update.get(vin)
)
Expand All @@ -493,7 +493,9 @@ async def update(self, car_id=None, wake_if_asleep=False, force=False):
)
): # Only update cars with update flag on
try:
data = await self.get(car_id, "data", wake_if_asleep)
data = await self.get(
car_id, "data", wake_if_asleep=wake_if_asleep
)
except TeslaException:
data = None
if data and data["response"]:
Expand Down

0 comments on commit 0892b91

Please sign in to comment.