mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Explicitly pass in the config_entry in lacrosse_view coordinator (#138122)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
4705df9ec8
commit
284a70932e
@ -30,7 +30,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
except LoginError as error:
|
except LoginError as error:
|
||||||
raise ConfigEntryAuthFailed from error
|
raise ConfigEntryAuthFailed from error
|
||||||
|
|
||||||
coordinator = LaCrosseUpdateCoordinator(hass, api, entry)
|
coordinator = LaCrosseUpdateCoordinator(hass, entry, api)
|
||||||
|
|
||||||
_LOGGER.debug("First refresh")
|
_LOGGER.debug("First refresh")
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
@ -27,12 +27,13 @@ class LaCrosseUpdateCoordinator(DataUpdateCoordinator[list[Sensor]]):
|
|||||||
id: str
|
id: str
|
||||||
hass: HomeAssistant
|
hass: HomeAssistant
|
||||||
devices: list[Sensor] | None = None
|
devices: list[Sensor] | None = None
|
||||||
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
api: LaCrosse,
|
|
||||||
entry: ConfigEntry,
|
entry: ConfigEntry,
|
||||||
|
api: LaCrosse,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize DataUpdateCoordinator for LaCrosse View."""
|
"""Initialize DataUpdateCoordinator for LaCrosse View."""
|
||||||
self.api = api
|
self.api = api
|
||||||
@ -45,6 +46,7 @@ class LaCrosseUpdateCoordinator(DataUpdateCoordinator[list[Sensor]]):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=entry,
|
||||||
name="LaCrosse View",
|
name="LaCrosse View",
|
||||||
update_interval=timedelta(seconds=SCAN_INTERVAL),
|
update_interval=timedelta(seconds=SCAN_INTERVAL),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user