Skip to content

Commit

Permalink
Merge pull request #93 from zabuldon/dev
Browse files Browse the repository at this point in the history
fix: fix indentation of sleep_interval
  • Loading branch information
alandtse committed Jul 3, 2020
2 parents 9d1fc6f + 96ab248 commit f10a493
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 @@ -582,9 +582,9 @@ def _calculate_next_interval(vin: Text) -> int:
or self.__climate[vin].get("is_climate_on")
or self.__charging[vin].get("charging_state") == "Charging"
):
sleep_interval = max(SLEEP_INTERVAL, self.update_interval)
if self.__update_state[vin] != "trying_to_sleep":
self.__update_state[vin] = "trying_to_sleep"
sleep_interval = max(SLEEP_INTERVAL, self.update_interval)
_LOGGER.debug(
"%s trying to sleep; scan throttled to %s seconds and will ignore updates for %s seconds",
vin[-5:],
Expand Down

0 comments on commit f10a493

Please sign in to comment.