Fix unhandled exception with SimpliSafe socket disconnection (#41917)

This commit is contained in:
Aaron Bach
2020-10-15 16:00:57 -06:00
committed by GitHub
parent da6bdd4464
commit a0bb8ae5d9

View File

@@ -450,7 +450,7 @@ class SimpliSafe:
"""Initialize the data class."""
asyncio.create_task(self.websocket.async_connect())
self._hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STOP, self.websocket.async_disconnect
EVENT_HOMEASSISTANT_STOP, self.websocket.async_disconnect()
)
self.systems = await self._api.get_systems()