Skip to content

Commit

Permalink
Explicitly pass in the config_entry in lacrosse_view coordinator (#13…
Browse files Browse the repository at this point in the history
…8122)

explicitly pass in the config_entry in coordinator
  • Loading branch information
mib1185 authored Feb 9, 2025
1 parent 4705df9 commit 284a709
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/lacrosse_view/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/lacrosse_view/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,6 +46,7 @@ def __init__(
super().__init__(
hass,
_LOGGER,
config_entry=entry,
name="LaCrosse View",
update_interval=timedelta(seconds=SCAN_INTERVAL),
)
Expand Down

0 comments on commit 284a709

Please sign in to comment.