Explicitly pass in the config_entry in govee_light_local coordinator (#137843)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-08 13:15:24 +01:00 committed by GitHub
parent 36a0c49cee
commit 86e44fc1cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -23,7 +23,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistant, entry: GoveeLocalConfigEntry) -> bool:
"""Set up Govee light local from a config entry."""
coordinator = GoveeLocalApiCoordinator(hass=hass)
coordinator = GoveeLocalApiCoordinator(hass, entry)
async def await_cleanup():
cleanup_complete: asyncio.Event = coordinator.cleanup()

View File

@ -26,11 +26,16 @@ type GoveeLocalConfigEntry = ConfigEntry[GoveeLocalApiCoordinator]
class GoveeLocalApiCoordinator(DataUpdateCoordinator[list[GoveeDevice]]):
"""Govee light local coordinator."""
def __init__(self, hass: HomeAssistant) -> None:
config_entry: GoveeLocalConfigEntry
def __init__(
self, hass: HomeAssistant, config_entry: GoveeLocalConfigEntry
) -> None:
"""Initialize my coordinator."""
super().__init__(
hass=hass,
logger=_LOGGER,
config_entry=config_entry,
name="GoveeLightLocalApi",
update_interval=SCAN_INTERVAL,
)