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(
|
config_entry_data[DATA_UPDATE_COORDINATOR] = DeviceDataUpdateCoordinator(
|
||||||
hass,
|
hass,
|
||||||
|
config_entry,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
api,
|
api,
|
||||||
# Name of the data. For logging purposes.
|
# Name of the data. For logging purposes.
|
||||||
|
|
|
@ -8,6 +8,7 @@ import logging
|
||||||
|
|
||||||
from ismartgate import AbstractGateApi, GogoGate2InfoResponse, ISmartGateInfoResponse
|
from ismartgate import AbstractGateApi, GogoGate2InfoResponse, ISmartGateInfoResponse
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.debounce import Debouncer
|
from homeassistant.helpers.debounce import Debouncer
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||||
|
@ -18,9 +19,12 @@ class DeviceDataUpdateCoordinator(
|
||||||
):
|
):
|
||||||
"""Manages polling for state changes from the device."""
|
"""Manages polling for state changes from the device."""
|
||||||
|
|
||||||
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
logger: logging.Logger,
|
logger: logging.Logger,
|
||||||
api: AbstractGateApi,
|
api: AbstractGateApi,
|
||||||
*,
|
*,
|
||||||
|
@ -33,10 +37,10 @@ class DeviceDataUpdateCoordinator(
|
||||||
request_refresh_debouncer: Debouncer | None = None,
|
request_refresh_debouncer: Debouncer | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the data update coordinator."""
|
"""Initialize the data update coordinator."""
|
||||||
DataUpdateCoordinator.__init__(
|
super().__init__(
|
||||||
self,
|
|
||||||
hass,
|
hass,
|
||||||
logger,
|
logger,
|
||||||
|
config_entry=config_entry,
|
||||||
name=name,
|
name=name,
|
||||||
update_interval=update_interval,
|
update_interval=update_interval,
|
||||||
update_method=update_method,
|
update_method=update_method,
|
||||||
|
|
Loading…
Reference in New Issue