mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
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:
parent
36a0c49cee
commit
86e44fc1cf
@ -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()
|
||||
|
@ -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,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user