diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index 9997b86c288..80784ce51b7 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -17,13 +17,7 @@ from simplipy.websocket import ( ) import voluptuous as vol -from homeassistant.const import ( - ATTR_CODE, - CONF_CODE, - CONF_TOKEN, - CONF_USERNAME, - EVENT_HOMEASSISTANT_STOP, -) +from homeassistant.const import ATTR_CODE, CONF_CODE, CONF_TOKEN, CONF_USERNAME from homeassistant.core import CoreState, callback from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import ( @@ -454,17 +448,21 @@ class SimpliSafe: async def async_init(self): """Initialize the data class.""" - asyncio.create_task(self.websocket.async_connect()) + # 2021-04-29: Disabling connection to the websocket due to the SimpliSafe cloud + # removing it (and not providing a clear alternative). + # asyncio.create_task(self.websocket.async_connect()) - async def async_websocket_disconnect(_): - """Define an event handler to disconnect from the websocket.""" - await self.websocket.async_disconnect() + # async def async_websocket_disconnect(_): + # """Define an event handler to disconnect from the websocket.""" + # await self.websocket.async_disconnect() - self._hass.data[DOMAIN][DATA_LISTENER][self.config_entry.entry_id].append( - self._hass.bus.async_listen_once( - EVENT_HOMEASSISTANT_STOP, async_websocket_disconnect - ) - ) + # 2021-04-29: Disabling disconnection from the websocket due to the SimpliSafe + # cloud removing it (and not providing a clear alternative). + # self._hass.data[DOMAIN][DATA_LISTENER][self.config_entry.entry_id].append( + # self._hass.bus.async_listen_once( + # EVENT_HOMEASSISTANT_STOP, async_websocket_disconnect + # ) + # ) self.systems = await self._api.get_systems() for system in self.systems.values():