Update scaffold scripts to use async_forward_entry_setups (#86647)
This commit is contained in:
parent
a56f6cb863
commit
1d1d69ca02
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue