mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
ESPHome: Remove disconnect callbacks after they are done (#69169)
This commit is contained in:
parent
198f4a12f0
commit
0558be0ab2
@ -520,6 +520,7 @@ async def _cleanup_instance(
|
|||||||
data = domain_data.pop_entry_data(entry)
|
data = domain_data.pop_entry_data(entry)
|
||||||
for disconnect_cb in data.disconnect_callbacks:
|
for disconnect_cb in data.disconnect_callbacks:
|
||||||
disconnect_cb()
|
disconnect_cb()
|
||||||
|
data.disconnect_callbacks = []
|
||||||
for cleanup_callback in data.cleanup_callbacks:
|
for cleanup_callback in data.cleanup_callbacks:
|
||||||
cleanup_callback()
|
cleanup_callback()
|
||||||
await data.client.disconnect()
|
await data.client.disconnect()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user