mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Explicitly pass in the config_entry in arve coordinator init (#137712)
explicitly pass in the config_entry in arve coordinator init
This commit is contained in:
parent
292409f1d5
commit
2d9db62828
@ -13,7 +13,7 @@ PLATFORMS: list[Platform] = [Platform.SENSOR]
|
|||||||
async def async_setup_entry(hass: HomeAssistant, entry: ArveConfigEntry) -> bool:
|
async def async_setup_entry(hass: HomeAssistant, entry: ArveConfigEntry) -> bool:
|
||||||
"""Set up Arve from a config entry."""
|
"""Set up Arve from a config entry."""
|
||||||
|
|
||||||
coordinator = ArveCoordinator(hass)
|
coordinator = ArveCoordinator(hass, entry)
|
||||||
|
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
|
||||||
|
@ -30,11 +30,12 @@ class ArveCoordinator(DataUpdateCoordinator[ArveSensProData]):
|
|||||||
config_entry: ArveConfigEntry
|
config_entry: ArveConfigEntry
|
||||||
devices: ArveDevices
|
devices: ArveDevices
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistant) -> None:
|
def __init__(self, hass: HomeAssistant, config_entry: ArveConfigEntry) -> None:
|
||||||
"""Initialize Arve coordinator."""
|
"""Initialize Arve coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=DOMAIN,
|
name=DOMAIN,
|
||||||
update_interval=timedelta(seconds=60),
|
update_interval=timedelta(seconds=60),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user