custom_components/best_bottrop_garbage_collection/__init__.py
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
    """Set up BEST Bottrop from a config entry."""

    coordinator = BESTCoordinator(hass)
    hass.data[DOMAIN] = {COORDINATOR: coordinator}
    # hass.data[DOMAIN].coordinator = coordinator

    hass.config_entries.async_setup_platforms(entry, PLATFORMS)

    # Update data for the first time. This has to be done after adding the entities,
    # otherwise the listeners won't be ready and won't be updated after reboot or
    # adding the component for the first time
    await coordinator.async_refresh()

    return True
Set up BEST Bottrop from a config entry.
Set up BEST Bottrop from a config entry.
Set up BEST Bottrop from a config entry .
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
    coordinator = BESTCoordinator(hass)
    hass.data[DOMAIN] = {COORDINATOR: coordinator}
    hass.config_entries.async_setup_platforms(entry, PLATFORMS)
    await coordinator.async_refresh()
    return True
async def async_setup_entry ( hass : HomeAssistant , entry : ConfigEntry ) -> bool : coordinator = BESTCoordinator ( hass ) hass . data [ DOMAIN ] = { COORDINATOR : coordinator } hass . config_entries . async_setup_platforms ( entry , PLATFORMS ) await coordinator . async_refresh ( ) return True
Set up BEST Bottrop from a config entry.
Set up BEST Bottrop from a config entry .
"""Set up BEST Bottrop from a config entry.""" # hass.data[DOMAIN].coordinator = coordinator # Update data for the first time. This has to be done after adding the entities, # otherwise the listeners won't be ready and won't be updated after reboot or # adding the component for the first time
hass
HomeAssistant
entry
ConfigEntry