Explicitly pass in the config_entry in gogogate2 coordinator (#137837)
explicitly pass in the config_entry in coordinatorpull/131282/head
parent
2634f0aba0
commit
39d6aaf294
|
@ -62,6 +62,7 @@ def get_data_update_coordinator(
|
|||
|
||||
config_entry_data[DATA_UPDATE_COORDINATOR] = DeviceDataUpdateCoordinator(
|
||||
hass,
|
||||
config_entry,
|
||||
_LOGGER,
|
||||
api,
|
||||
# Name of the data. For logging purposes.
|
||||
|
|
|
@ -8,6 +8,7 @@ import logging
|
|||
|
||||
from ismartgate import AbstractGateApi, GogoGate2InfoResponse, ISmartGateInfoResponse
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.debounce import Debouncer
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
@ -18,9 +19,12 @@ class DeviceDataUpdateCoordinator(
|
|||
):
|
||||
"""Manages polling for state changes from the device."""
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
logger: logging.Logger,
|
||||
api: AbstractGateApi,
|
||||
*,
|
||||
|
@ -33,10 +37,10 @@ class DeviceDataUpdateCoordinator(
|
|||
request_refresh_debouncer: Debouncer | None = None,
|
||||
) -> None:
|
||||
"""Initialize the data update coordinator."""
|
||||
DataUpdateCoordinator.__init__(
|
||||
self,
|
||||
super().__init__(
|
||||
hass,
|
||||
logger,
|
||||
config_entry=config_entry,
|
||||
name=name,
|
||||
update_interval=update_interval,
|
||||
update_method=update_method,
|
||||
|
|
Loading…
Reference in New Issue