Remove deprecated async_setup_platforms (#91929)

This commit is contained in:
J. Nick Koston
2023-04-23 22:38:35 -05:00
committed by GitHub
parent a203149133
commit 739963b5ee
4 changed files with 3 additions and 23 deletions

View File

@@ -1356,26 +1356,6 @@ class ConfigEntries:
self.hass, SIGNAL_CONFIG_ENTRY_CHANGED, change_type, entry
)
@callback
def async_setup_platforms(
self, entry: ConfigEntry, platforms: Iterable[Platform | str]
) -> None:
"""Forward the setup of an entry to platforms."""
report(
(
"called async_setup_platforms instead of awaiting"
" async_forward_entry_setups; this will fail in version 2023.3"
),
# Raise this to warning once all core integrations have been migrated
level=logging.WARNING,
error_if_core=False,
)
for platform in platforms:
self.hass.async_create_task(
self.async_forward_entry_setup(entry, platform),
f"config entry forward setup {entry.title} {entry.domain} {entry.entry_id} {platform}",
)
async def async_forward_entry_setups(
self, entry: ConfigEntry, platforms: Iterable[Platform | str]
) -> None: