From 30b30ae41149b0a8269b18563a73b0b847a1986a Mon Sep 17 00:00:00 2001 From: Jack Simbach Date: Sun, 10 Jan 2021 22:10:23 -0500 Subject: [PATCH] - replaced timeout with constant --- ge_kitchen/update_coordinator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ge_kitchen/update_coordinator.py b/ge_kitchen/update_coordinator.py index 096d616..ec657d5 100644 --- a/ge_kitchen/update_coordinator.py +++ b/ge_kitchen/update_coordinator.py @@ -159,7 +159,7 @@ class GeKitchenUpdateCoordinator(DataUpdateCoordinator): raise HaCannotConnect('Unknown connection failure') try: - with async_timeout.timeout(30): + with async_timeout.timeout(ASYNC_TIMEOUT): await self.initialization_future except TimeoutError: raise HaCannotConnect('Initialization timed out') @@ -202,7 +202,7 @@ class GeKitchenUpdateCoordinator(DataUpdateCoordinator): """Kill the client. Leaving this in for testing purposes.""" await asyncio.sleep(30) _LOGGER.critical('Killing the connection. Popcorn time.') - await self.client.websocket.close() + await self.client.disconnect() @callback def reconnect(self, log=False) -> None: