mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Explicitly pass in the config_entry in volvooncall coordinator (#137875)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
17569d8186
commit
7ec7badef6
@ -52,7 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
volvo_data = VolvoData(hass, connection, entry)
|
volvo_data = VolvoData(hass, connection, entry)
|
||||||
|
|
||||||
coordinator = VolvoUpdateCoordinator(hass, volvo_data)
|
coordinator = VolvoUpdateCoordinator(hass, entry, volvo_data)
|
||||||
|
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||||
|
|
||||||
@ -15,12 +16,17 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
class VolvoUpdateCoordinator(DataUpdateCoordinator[None]):
|
class VolvoUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||||
"""Volvo coordinator."""
|
"""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."""
|
"""Initialize the data update coordinator."""
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name="volvooncall",
|
name="volvooncall",
|
||||||
update_interval=DEFAULT_UPDATE_INTERVAL,
|
update_interval=DEFAULT_UPDATE_INTERVAL,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user