mirror of
https://github.com/home-assistant/core.git
synced 2026-09-12 02:34:48 -05:00
ESPHome: Remove disconnect callbacks after they are done (#69169)
This commit is contained in:
@@ -520,6 +520,7 @@ async def _cleanup_instance(
|
||||
data = domain_data.pop_entry_data(entry)
|
||||
for disconnect_cb in data.disconnect_callbacks:
|
||||
disconnect_cb()
|
||||
data.disconnect_callbacks = []
|
||||
for cleanup_callback in data.cleanup_callbacks:
|
||||
cleanup_callback()
|
||||
await data.client.disconnect()
|
||||
|
||||
Reference in New Issue
Block a user