mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 19:27:51 +00:00
Explicitly pass in the config_entry in atag coordinator init (#137716)
explicitly pass in the config_entry in atag coordinator init
This commit is contained in:
parent
5e99b06126
commit
2634f0aba0
@ -19,17 +19,22 @@ type AtagConfigEntry = ConfigEntry[AtagDataUpdateCoordinator]
|
|||||||
class AtagDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
class AtagDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||||
"""Atag data update coordinator."""
|
"""Atag data update coordinator."""
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
|
config_entry: AtagConfigEntry
|
||||||
|
|
||||||
|
def __init__(self, hass: HomeAssistant, config_entry: AtagConfigEntry) -> None:
|
||||||
"""Initialize Atag coordinator."""
|
"""Initialize Atag coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name="Atag",
|
name="Atag",
|
||||||
update_interval=timedelta(seconds=60),
|
update_interval=timedelta(seconds=60),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.atag = AtagOne(
|
self.atag = AtagOne(
|
||||||
session=async_get_clientsession(hass), **entry.data, device=entry.unique_id
|
session=async_get_clientsession(hass),
|
||||||
|
**config_entry.data,
|
||||||
|
device=config_entry.unique_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _async_update_data(self) -> None:
|
async def _async_update_data(self) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user