Skip to content

Commit 1d1d69c

Browse files
authored
Update scaffold scripts to use async_forward_entry_setups (home-assistant#86647)
1 parent a56f6cb commit 1d1d69c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

script/scaffold/templates/config_flow_discovery/integration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
2121
# TODO 3. Store an API object for your platforms to access
2222
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
2323

24-
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
24+
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
2525

2626
return True
2727

script/scaffold/templates/config_flow_helper/integration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
1515

1616
# TODO Optionally validate config entry options before setting up platform
1717

18-
hass.config_entries.async_setup_platforms(entry, (Platform.SENSOR,))
18+
await hass.config_entries.async_forward_entry_setups(entry, (Platform.SENSOR,))
1919

2020
# TODO Remove if the integration does not have an options flow
2121
entry.async_on_unload(entry.add_update_listener(config_entry_update_listener))

script/scaffold/templates/config_flow_oauth2/integration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
3232
aiohttp_client.async_get_clientsession(hass), session
3333
)
3434

35-
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
35+
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
3636

3737
return True
3838

0 commit comments

Comments
 (0)