diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index 090041898207b0..add37cb0f1e9b3 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -154,6 +154,7 @@ @callback def _async_save_refresh_token(hass, config_entry, token): + """Save a refresh token to the config entry.""" hass.config_entries.async_update_entry( config_entry, data={**config_entry.data, CONF_TOKEN: token} ) @@ -547,12 +548,7 @@ async def update_system(system): _LOGGER.error("Unknown error while updating: %s", result) return - if self._api.refresh_token_dirty: - # Reconnect the websocket: - await self._api.websocket.async_disconnect() - await self._api.websocket.async_connect() - - # Save the new refresh token: + if self._api.refresh_token != self._config_entry.data[CONF_TOKEN]: _async_save_refresh_token( self._hass, self._config_entry, self._api.refresh_token ) diff --git a/homeassistant/components/simplisafe/manifest.json b/homeassistant/components/simplisafe/manifest.json index e44f39265cbec4..ad753dfd8b07e3 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==8.1.1"], + "requirements": ["simplisafe-python==9.0.0"], "dependencies": [], "codeowners": ["@bachya"] } diff --git a/requirements_all.txt b/requirements_all.txt index a340f99d7c60a3..c1f04f9b0ffa15 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1827,7 +1827,7 @@ simplehound==0.3 simplepush==1.1.4 # homeassistant.components.simplisafe -simplisafe-python==8.1.1 +simplisafe-python==9.0.0 # homeassistant.components.sisyphus sisyphus-control==2.2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index be073a4b929713..e1b5782e99fb5f 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -626,7 +626,7 @@ sentry-sdk==0.13.5 simplehound==0.3 # homeassistant.components.simplisafe -simplisafe-python==8.1.1 +simplisafe-python==9.0.0 # homeassistant.components.sleepiq sleepyq==0.7