mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Remove no-longer-functioning SimpliSafe websocket support (#49876)
* Remove no-longer-functioning SimpliSafe websocket support * Linting
This commit is contained in:
parent
38a03009ae
commit
73714eba4b
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user