Skip to content

Commit

Permalink
Migrate to use async_forward_entry_setups
Browse files Browse the repository at this point in the history
Replaces deprecated async_setup_platforms with async_forward_entry_setups
  • Loading branch information
kai.tseng committed May 4, 2023
1 parent 9dfc44c commit b43a07b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/blueair/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
]
await asyncio.gather(*tasks)

hass.config_entries.async_setup_platforms(entry, PLATFORMS)
try:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
except AttributeError:
hass.config_entries.async_setup_platforms(entry, PLATFORMS)

return True

Expand Down

0 comments on commit b43a07b

Please sign in to comment.