ESPHome: Remove disconnect callbacks after they are done (#69169)
This commit is contained in:
parent
198f4a12f0
commit
0558be0ab2
1 changed files with 1 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue