mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Explicitly pass in the config_entry in lametric coordinator (#138120)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
9e7f8b7bff
commit
faf4ad07fc
@ -21,14 +21,15 @@ class LaMetricDataUpdateCoordinator(DataUpdateCoordinator[Device]):
|
||||
|
||||
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||
"""Initialize the LaMatric coordinator."""
|
||||
self.config_entry = entry
|
||||
self.lametric = LaMetricDevice(
|
||||
host=entry.data[CONF_HOST],
|
||||
api_key=entry.data[CONF_API_KEY],
|
||||
session=async_get_clientsession(hass),
|
||||
)
|
||||
|
||||
super().__init__(hass, LOGGER, name=DOMAIN, update_interval=SCAN_INTERVAL)
|
||||
super().__init__(
|
||||
hass, LOGGER, config_entry=entry, name=DOMAIN, update_interval=SCAN_INTERVAL
|
||||
)
|
||||
|
||||
async def _async_update_data(self) -> Device:
|
||||
"""Fetch device information of the LaMetric device."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user