mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Explicitly pass in the config_entry in dremel_3d_printer coordinator (#137740)
This commit is contained in:
parent
0cbef18b73
commit
7fc92e4c25
@ -29,7 +29,7 @@ async def async_setup_entry(
|
||||
f"Unable to connect to Dremel 3D Printer: {ex}"
|
||||
) from ex
|
||||
|
||||
coordinator = Dremel3DPrinterDataUpdateCoordinator(hass, api)
|
||||
coordinator = Dremel3DPrinterDataUpdateCoordinator(hass, config_entry, api)
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
config_entry.runtime_data = coordinator
|
||||
platforms = list(PLATFORMS)
|
||||
|
@ -18,11 +18,14 @@ class Dremel3DPrinterDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||
|
||||
config_entry: DremelConfigEntry
|
||||
|
||||
def __init__(self, hass: HomeAssistant, api: Dremel3DPrinter) -> None:
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, config_entry: DremelConfigEntry, api: Dremel3DPrinter
|
||||
) -> None:
|
||||
"""Initialize Dremel 3D Printer data update coordinator."""
|
||||
super().__init__(
|
||||
hass=hass,
|
||||
logger=LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=10),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user