diff --git a/homeassistant/components/simplisafe/alarm_control_panel.py b/homeassistant/components/simplisafe/alarm_control_panel.py index f02a6ac2cd7..37694f75bac 100644 --- a/homeassistant/components/simplisafe/alarm_control_panel.py +++ b/homeassistant/components/simplisafe/alarm_control_panel.py @@ -13,8 +13,6 @@ from simplipy.websocket import ( EVENT_ARMED_HOME, EVENT_AWAY_EXIT_DELAY_BY_KEYPAD, EVENT_AWAY_EXIT_DELAY_BY_REMOTE, - EVENT_CONNECTION_LOST, - EVENT_CONNECTION_RESTORED, EVENT_DISARMED_BY_MASTER_PIN, EVENT_DISARMED_BY_REMOTE, EVENT_HOME_EXIT_DELAY, @@ -177,6 +175,11 @@ class SimpliSafeAlarm(SimpliSafeEntity, AlarmControlPanel): @callback def async_update_from_rest_api(self): """Update the entity with the provided REST API data.""" + if self._system.state == SystemStates.error: + self._online = False + return + self._online = True + if self._system.version == 3: self._attrs.update( { @@ -224,9 +227,7 @@ class SimpliSafeAlarm(SimpliSafeEntity, AlarmControlPanel): EVENT_HOME_EXIT_DELAY, ): self._state = STATE_ALARM_ARMING - elif event.event_type == EVENT_CONNECTION_LOST: - self._online = False - elif event.event_type == EVENT_CONNECTION_RESTORED: - self._online = True + else: + self._state = None self._changed_by = event.changed_by diff --git a/homeassistant/components/simplisafe/lock.py b/homeassistant/components/simplisafe/lock.py index 4772d9922dc..beebbd5b0b4 100644 --- a/homeassistant/components/simplisafe/lock.py +++ b/homeassistant/components/simplisafe/lock.py @@ -3,13 +3,7 @@ import logging from simplipy.errors import SimplipyError from simplipy.lock import LockStates -from simplipy.websocket import ( - EVENT_CONNECTION_LOST, - EVENT_CONNECTION_RESTORED, - EVENT_LOCK_ERROR, - EVENT_LOCK_LOCKED, - EVENT_LOCK_UNLOCKED, -) +from simplipy.websocket import EVENT_LOCK_ERROR, EVENT_LOCK_LOCKED, EVENT_LOCK_UNLOCKED from homeassistant.components.lock import LockDevice from homeassistant.const import STATE_LOCKED, STATE_UNKNOWN, STATE_UNLOCKED @@ -95,7 +89,5 @@ class SimpliSafeLock(SimpliSafeEntity, LockDevice): self._state = STATE_UNLOCKED elif event.event_type == EVENT_LOCK_ERROR: self._state = STATE_UNKNOWN - elif event.event_type == EVENT_CONNECTION_LOST: - self._online = False - elif event.event_type == EVENT_CONNECTION_RESTORED: - self._online = True + else: + self._state = None diff --git a/homeassistant/components/simplisafe/manifest.json b/homeassistant/components/simplisafe/manifest.json index e55cb2f8b6d..3b04d26732c 100644 --- a/homeassistant/components/simplisafe/manifest.json +++ b/homeassistant/components/simplisafe/manifest.json @@ -3,7 +3,7 @@ "name": "SimpliSafe", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/simplisafe", - "requirements": ["simplisafe-python==7.2.0"], + "requirements": ["simplisafe-python==7.1.0"], "dependencies": [], "codeowners": ["@bachya"] } diff --git a/requirements_all.txt b/requirements_all.txt index 88868552459..5dd8978d4d5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1822,7 +1822,7 @@ simplehound==0.3 simplepush==1.1.4 # homeassistant.components.simplisafe -simplisafe-python==7.2.0 +simplisafe-python==7.1.0 # homeassistant.components.sisyphus sisyphus-control==2.2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 8b6b382026c..58edcc54512 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -600,7 +600,7 @@ sentry-sdk==0.13.5 simplehound==0.3 # homeassistant.components.simplisafe -simplisafe-python==7.2.0 +simplisafe-python==7.1.0 # homeassistant.components.sleepiq sleepyq==0.7