Skip to content

Commit

Permalink
Fix error loading multiple vehicles
Browse files Browse the repository at this point in the history
  • Loading branch information
natekspencer committed Sep 22, 2023
1 parent f2aa23b commit b6a75cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/rivian/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ class VehicleCoordinator(RivianDataUpdateCoordinator[dict[str, Any]]):

key = "vehicleState"
_update_interval = 15 * 60 # 15 minutes
_initial = asyncio.Event()
_unsub_handler: Coroutine[None, None, None] | None = None
_awake = asyncio.Event()

def __init__(self, hass: HomeAssistant, client: Rivian, vehicle_id: str) -> None:
"""Initialize the coordinator."""
super().__init__(hass=hass, client=client)
self.vehicle_id = vehicle_id
self.charging_coordinator = ChargingCoordinator(hass, client, vehicle_id)
self.drivers_coordinator = DriverKeyCoordinator(hass, client, vehicle_id)
self._initial = asyncio.Event()
self._unsub_handler: Coroutine[None, None, None] | None = None
self._awake = asyncio.Event()

async def _async_update_data(self) -> dict[str, Any]:
"""Get the latest data from Rivian."""
Expand Down

0 comments on commit b6a75cb

Please sign in to comment.