mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix unload for Alexa Devices (#147548)
This commit is contained in:
parent
f0a78aadbe
commit
6290facffb
@ -29,5 +29,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bo
|
|||||||
|
|
||||||
async def async_unload_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool:
|
async def async_unload_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool:
|
||||||
"""Unload a config entry."""
|
"""Unload a config entry."""
|
||||||
await entry.runtime_data.api.close()
|
coordinator = entry.runtime_data
|
||||||
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
||||||
|
await coordinator.api.close()
|
||||||
|
|
||||||
|
return unload_ok
|
||||||
|
Loading…
x
Reference in New Issue
Block a user