1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Update scaffold scripts to use async_forward_entry_setups (#86647)

This commit is contained in:
J. Nick Koston 2023-01-25 10:26:31 -10:00 committed by GitHub
parent a56f6cb863
commit 1d1d69ca02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# TODO 3. Store an API object for your platforms to access
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True

View File

@ -15,7 +15,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# TODO Optionally validate config entry options before setting up platform
hass.config_entries.async_setup_platforms(entry, (Platform.SENSOR,))
await hass.config_entries.async_forward_entry_setups(entry, (Platform.SENSOR,))
# TODO Remove if the integration does not have an options flow
entry.async_on_unload(entry.add_update_listener(config_entry_update_listener))

View File

@ -32,7 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
aiohttp_client.async_get_clientsession(hass), session
)
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True