mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Migrate zha to use async_unload_platforms (#118100)
This commit is contained in:
parent
131c1807c4
commit
2954cba65d
@ -1,6 +1,5 @@
|
|||||||
"""Support for Zigbee Home Automation devices."""
|
"""Support for Zigbee Home Automation devices."""
|
||||||
|
|
||||||
import asyncio
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
@ -238,12 +237,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
websocket_api.async_unload_api(hass)
|
websocket_api.async_unload_api(hass)
|
||||||
|
|
||||||
# our components don't have unload methods so no need to look at return values
|
# our components don't have unload methods so no need to look at return values
|
||||||
await asyncio.gather(
|
await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
|
||||||
*(
|
|
||||||
hass.config_entries.async_forward_entry_unload(config_entry, platform)
|
|
||||||
for platform in PLATFORMS
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user