Skip to content

Commit f3ea536

Browse files
committed
Migrate from async_setup_platforms to async_forward_entry_setup
1 parent be62b1b commit f3ea536

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

custom_components/uhoo/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
from .const import DOMAIN, LOGGER, PLATFORMS, STARTUP_MESSAGE, UPDATE_INTERVAL
2222

23+
# https://github.com/home-assistant/example-custom-config/tree/master/custom_components
2324

2425
async def async_setup(hass: HomeAssistant, config: Config) -> bool:
25-
"""Set up this integration using YAML is not supported."""
26+
"""Set up all platforms for this device/entry."""
2627
return True
2728

2829

@@ -58,10 +59,10 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
5859
raise ConfigEntryNotReady
5960

6061
hass.data[DOMAIN][config_entry.entry_id] = coordinator
61-
62-
# Set up all platforms for this device/entry.
63-
hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)
64-
62+
for platform in PLATFORMS:
63+
hass.async_add_job(hass.config_entries.async_forward_entry_setup(
64+
config_entry, platform))
65+
6566
return True
6667

6768

0 commit comments

Comments
 (0)