Pass config entry to hue coordinator (#149941)

This commit is contained in:
Joost Lekkerkerker
2025-08-04 13:27:10 +02:00
committed by GitHub
parent 33eaca24d6
commit 7a6aaf667b
2 changed files with 3 additions and 0 deletions

View File

@@ -163,6 +163,7 @@ async def async_setup_entry(
name="light", name="light",
update_method=partial(async_safe_fetch, bridge, bridge.api.lights.update), update_method=partial(async_safe_fetch, bridge, bridge.api.lights.update),
update_interval=SCAN_INTERVAL, update_interval=SCAN_INTERVAL,
config_entry=config_entry,
request_refresh_debouncer=Debouncer( request_refresh_debouncer=Debouncer(
bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True
), ),
@@ -197,6 +198,7 @@ async def async_setup_entry(
name="group", name="group",
update_method=partial(async_safe_fetch, bridge, bridge.api.groups.update), update_method=partial(async_safe_fetch, bridge, bridge.api.groups.update),
update_interval=SCAN_INTERVAL, update_interval=SCAN_INTERVAL,
config_entry=config_entry,
request_refresh_debouncer=Debouncer( request_refresh_debouncer=Debouncer(
bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True
), ),

View File

@@ -53,6 +53,7 @@ class SensorManager:
LOGGER, LOGGER,
name="sensor", name="sensor",
update_method=self.async_update_data, update_method=self.async_update_data,
config_entry=bridge.config_entry,
update_interval=self.SCAN_INTERVAL, update_interval=self.SCAN_INTERVAL,
request_refresh_debouncer=debounce.Debouncer( request_refresh_debouncer=debounce.Debouncer(
bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True bridge.hass, LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=True