Skip to content

Commit

Permalink
fix: fix name collision on last_update_time
Browse files Browse the repository at this point in the history
Fixes collision from #989
  • Loading branch information
alandtse committed Jun 8, 2024
1 parent b2f26ec commit 2f113b4
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 2f113b4

Please sign in to comment.