Explicitly pass in the config_entry in intellifire coordinator (#138143)
explicitly pass in the config_entry in coordinatorpull/138157/head
parent
15af006fbe
commit
7c9d30eb06
|
@ -128,9 +128,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
) from err
|
||||
|
||||
# Construct coordinator
|
||||
data_update_coordinator = IntellifireDataUpdateCoordinator(
|
||||
hass=hass, fireplace=fireplace
|
||||
)
|
||||
data_update_coordinator = IntellifireDataUpdateCoordinator(hass, entry, fireplace)
|
||||
|
||||
LOGGER.debug("Fireplace to Initialized - Awaiting first refresh")
|
||||
await data_update_coordinator.async_config_entry_first_refresh()
|
||||
|
|
|
@ -9,6 +9,7 @@ from intellifire4py.control import IntelliFireController
|
|||
from intellifire4py.model import IntelliFirePollData
|
||||
from intellifire4py.read import IntelliFireDataProvider
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
@ -19,15 +20,19 @@ from .const import DOMAIN, LOGGER
|
|||
class IntellifireDataUpdateCoordinator(DataUpdateCoordinator[IntelliFirePollData]):
|
||||
"""Class to manage the polling of the fireplace API."""
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
fireplace: UnifiedFireplace,
|
||||
) -> None:
|
||||
"""Initialize the Coordinator."""
|
||||
super().__init__(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=15),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue