Explicitly pass in the config_entry in volvooncall coordinator (#137875)
explicitly pass in the config_entry in coordinatorpull/137989/head
parent
17569d8186
commit
7ec7badef6
|
@ -52,7 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
|
||||
volvo_data = VolvoData(hass, connection, entry)
|
||||
|
||||
coordinator = VolvoUpdateCoordinator(hass, volvo_data)
|
||||
coordinator = VolvoUpdateCoordinator(hass, entry, volvo_data)
|
||||
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import asyncio
|
||||
import logging
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
|
@ -15,12 +16,17 @@ _LOGGER = logging.getLogger(__name__)
|
|||
class VolvoUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||
"""Volvo coordinator."""
|
||||
|
||||
def __init__(self, hass: HomeAssistant, volvo_data: VolvoData) -> None:
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, config_entry: ConfigEntry, volvo_data: VolvoData
|
||||
) -> None:
|
||||
"""Initialize the data update coordinator."""
|
||||
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name="volvooncall",
|
||||
update_interval=DEFAULT_UPDATE_INTERVAL,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue