mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +00:00
Pass config entry directly to update coordinator in Sensibo (#132114)
This commit is contained in:
parent
92f38ef1a1
commit
56fc8a1f92
@ -21,7 +21,7 @@ type SensiboConfigEntry = ConfigEntry[SensiboDataUpdateCoordinator]
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: SensiboConfigEntry) -> bool:
|
||||
"""Set up Sensibo from a config entry."""
|
||||
|
||||
coordinator = SensiboDataUpdateCoordinator(hass)
|
||||
coordinator = SensiboDataUpdateCoordinator(hass, entry)
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
entry.runtime_data = coordinator
|
||||
|
||||
|
@ -29,11 +29,12 @@ class SensiboDataUpdateCoordinator(DataUpdateCoordinator[SensiboData]):
|
||||
|
||||
config_entry: SensiboConfigEntry
|
||||
|
||||
def __init__(self, hass: HomeAssistant) -> None:
|
||||
def __init__(self, hass: HomeAssistant, config_entry: SensiboConfigEntry) -> None:
|
||||
"""Initialize the Sensibo coordinator."""
|
||||
super().__init__(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=DEFAULT_SCAN_INTERVAL),
|
||||
# We don't want an immediate refresh since the device
|
||||
|
Loading…
x
Reference in New Issue
Block a user