mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +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
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import ATTR_CODE, CONF_CODE, CONF_TOKEN, CONF_USERNAME
|
||||||
ATTR_CODE,
|
|
||||||
CONF_CODE,
|
|
||||||
CONF_TOKEN,
|
|
||||||
CONF_USERNAME,
|
|
||||||
EVENT_HOMEASSISTANT_STOP,
|
|
||||||
)
|
|
||||||
from homeassistant.core import CoreState, callback
|
from homeassistant.core import CoreState, callback
|
||||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||||
from homeassistant.helpers import (
|
from homeassistant.helpers import (
|
||||||
@ -454,17 +448,21 @@ class SimpliSafe:
|
|||||||
|
|
||||||
async def async_init(self):
|
async def async_init(self):
|
||||||
"""Initialize the data class."""
|
"""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(_):
|
# async def async_websocket_disconnect(_):
|
||||||
"""Define an event handler to disconnect from the websocket."""
|
# """Define an event handler to disconnect from the websocket."""
|
||||||
await self.websocket.async_disconnect()
|
# await self.websocket.async_disconnect()
|
||||||
|
|
||||||
self._hass.data[DOMAIN][DATA_LISTENER][self.config_entry.entry_id].append(
|
# 2021-04-29: Disabling disconnection from the websocket due to the SimpliSafe
|
||||||
self._hass.bus.async_listen_once(
|
# cloud removing it (and not providing a clear alternative).
|
||||||
EVENT_HOMEASSISTANT_STOP, async_websocket_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
|
||||||
|
# )
|
||||||
|
# )
|
||||||
|
|
||||||
self.systems = await self._api.get_systems()
|
self.systems = await self._api.get_systems()
|
||||||
for system in self.systems.values():
|
for system in self.systems.values():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user