mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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:
|
||||
raise ConfigEntryAuthFailed from error
|
||||
|
||||
coordinator = LaCrosseUpdateCoordinator(hass, api, entry)
|
||||
coordinator = LaCrosseUpdateCoordinator(hass, entry, api)
|
||||
|
||||
_LOGGER.debug("First refresh")
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
@ -27,12 +27,13 @@ class LaCrosseUpdateCoordinator(DataUpdateCoordinator[list[Sensor]]):
|
||||
id: str
|
||||
hass: HomeAssistant
|
||||
devices: list[Sensor] | None = None
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
api: LaCrosse,
|
||||
entry: ConfigEntry,
|
||||
api: LaCrosse,
|
||||
) -> None:
|
||||
"""Initialize DataUpdateCoordinator for LaCrosse View."""
|
||||
self.api = api
|
||||
@ -45,6 +46,7 @@ class LaCrosseUpdateCoordinator(DataUpdateCoordinator[list[Sensor]]):
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="LaCrosse View",
|
||||
update_interval=timedelta(seconds=SCAN_INTERVAL),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user