mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Update scaffold scripts to use async_forward_entry_setups (#86647)
This commit is contained in:
parent
a56f6cb863
commit
1d1d69ca02
@ -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
|
# TODO 3. Store an API object for your platforms to access
|
||||||
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
|
# 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
|
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
|
# 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
|
# TODO Remove if the integration does not have an options flow
|
||||||
entry.async_on_unload(entry.add_update_listener(config_entry_update_listener))
|
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
|
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
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user