Skip to content

Commit

Permalink
fix: prevent update for in_service cars
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Feb 9, 2020
1 parent a3728e5 commit 606c11e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslajsonpy/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def _calculate_next_interval(vin: int) -> int:
car_id = self._update_id(car_id)
for vin, online in self.car_online.items():
# If specific car_id provided, only update match
if car_vin and car_vin != vin:
if (car_vin and car_vin != vin) or self.car_state[vin].get("in_service"):
continue
async with self.__lock[vin]:
car_state = self.car_state[vin].get("state")
Expand Down

0 comments on commit 606c11e

Please sign in to comment.