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 Paulus Schoutsen
parent 713d3025f2
commit de6f55dcfb

View File

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