Migrate zha to use async_unload_platforms (#118100)

This commit is contained in:
J. Nick Koston 2024-05-24 23:53:42 -10:00 committed by GitHub
parent 131c1807c4
commit 2954cba65d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,5 @@
"""Support for Zigbee Home Automation devices."""
import asyncio
import contextlib
import copy
import logging
@ -238,12 +237,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
websocket_api.async_unload_api(hass)
# our components don't have unload methods so no need to look at return values
await asyncio.gather(
*(
hass.config_entries.async_forward_entry_unload(config_entry, platform)
for platform in PLATFORMS
)
)
await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
return True