From f53e10bdf76858a66490161f10268eddbcf5e35e Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 6 Feb 2020 18:13:18 -0700 Subject: [PATCH] Code review comments --- homeassistant/components/simplisafe/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index fac21bdb683..83745078ca6 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -349,8 +349,6 @@ class SimpliSafeWebsocket: self._websocket_watchdog_listener = None self.last_events = {} - hass.loop.create_task(self.async_websocket_connect()) - async def _async_attempt_websocket_connect(self): """Attempt to connect to the websocket (retrying later on fail).""" try: @@ -429,6 +427,8 @@ class SimpliSafe: async def async_init(self): """Initialize the data class.""" + asyncio.create_task(self.websocket.async_websocket_connect()) + self.systems = await self._api.get_systems() for system in self.systems.values(): self._hass.async_create_task(