Fix blocking MQTT entry unload (#89922)

* Remove unneeded async_block_till_done

* use await asyncio.sleep(0) instead
This commit is contained in:
Jan Bouwhuis 2023-03-19 01:57:40 +01:00 committed by GitHub
parent 6ad9f420ab
commit e937693d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -704,7 +704,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
for component in PLATFORMS
)
)
await hass.async_block_till_done()
await asyncio.sleep(0)
# Unsubscribe reload dispatchers
while reload_dispatchers := mqtt_data.reload_dispatchers:
reload_dispatchers.pop()()