Skip to content

Commit

Permalink
Merge pull request #993 from alandtse/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse authored Jun 8, 2024
2 parents 4b2f9a2 + 332f4e9 commit 18cdb46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/tesla_custom/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ def __init__(
sw_version=car.car_version,
)
self._last_update_success: bool | None = None
self._last_update_time: float | None = None
self.last_update_time: float | None = None

@callback
def _handle_coordinator_update(self) -> None:
"""Handle updated data from the coordinator."""
prev_last_update_success = self._last_update_success
prev_last_update_time = self._last_update_time
prev_last_update_time = self.last_update_time
coordinator = self.coordinator
current_last_update_success = coordinator.last_update_success
current_last_update_time = coordinator.last_update_time
self._last_update_success = current_last_update_success
self._last_update_time = current_last_update_time
self.last_update_time = current_last_update_time
if (
prev_last_update_success == current_last_update_success
and prev_last_update_time == current_last_update_time
Expand Down

0 comments on commit 18cdb46

Please sign in to comment.