Skip to content

Commit

Permalink
Forwarding setup to config entry platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
elcajon authored Jun 18, 2024
1 parent ebf62d6 commit b692498
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions custom_components/dwd_weather/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

# Setup weather and sensor platforms
for component in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, component)
)
await hass.config_entries.async_forward_entry_setups(entry, [component])

elif entry.data[CONF_ENTITY_TYPE] == CONF_ENTITY_TYPE_MAP:
dwd_weather_data = DWDMapData(hass, entry)

Expand All @@ -102,9 +101,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
DWDWEATHER_COORDINATOR: dwdweather_coordinator,
}

hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, "camera")
)
await hass.config_entries.async_forward_entry_setups(entry, "camera")

return True

Expand Down

0 comments on commit b692498

Please sign in to comment.