await disconnect when unloading (#169)

Fixes simbaja#164.
This commit is contained in:
Alex Peters 2023-06-06 07:34:40 +10:00 committed by GitHub
parent 851f28d8ec
commit edba2bb4f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ class GeHomeUpdateCoordinator(DataUpdateCoordinator):
_LOGGER.info("ge_home shutting down")
if self.client:
self.client.clear_event_handlers()
self.client.disconnect()
self._hass.loop.create_task(self.client.disconnect())
async def on_device_update(self, data: Tuple[GeAppliance, Dict[ErdCodeType, Any]]):
"""Let HA know there's new state."""