Bump simplisafe-python to 9.0.0 (#32215)

This commit is contained in:
Aaron Bach 2020-02-26 19:52:07 -07:00 committed by GitHub
parent 4c5e364d90
commit df04fe3258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 9 deletions

View File

@ -154,6 +154,7 @@ CONFIG_SCHEMA = vol.Schema(
@callback @callback
def _async_save_refresh_token(hass, config_entry, token): def _async_save_refresh_token(hass, config_entry, token):
"""Save a refresh token to the config entry."""
hass.config_entries.async_update_entry( hass.config_entries.async_update_entry(
config_entry, data={**config_entry.data, CONF_TOKEN: token} config_entry, data={**config_entry.data, CONF_TOKEN: token}
) )
@ -501,12 +502,7 @@ class SimpliSafe:
_LOGGER.error("Unknown error while updating: %s", result) _LOGGER.error("Unknown error while updating: %s", result)
return return
if self._api.refresh_token_dirty: if self._api.refresh_token != self._config_entry.data[CONF_TOKEN]:
# Reconnect the websocket:
await self._api.websocket.async_disconnect()
await self._api.websocket.async_connect()
# Save the new refresh token:
_async_save_refresh_token( _async_save_refresh_token(
self._hass, self._config_entry, self._api.refresh_token self._hass, self._config_entry, self._api.refresh_token
) )

View File

@ -3,7 +3,7 @@
"name": "SimpliSafe", "name": "SimpliSafe",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/simplisafe", "documentation": "https://www.home-assistant.io/integrations/simplisafe",
"requirements": ["simplisafe-python==8.1.1"], "requirements": ["simplisafe-python==9.0.0"],
"dependencies": [], "dependencies": [],
"codeowners": ["@bachya"] "codeowners": ["@bachya"]
} }

View File

@ -1831,7 +1831,7 @@ simplehound==0.3
simplepush==1.1.4 simplepush==1.1.4
# homeassistant.components.simplisafe # homeassistant.components.simplisafe
simplisafe-python==8.1.1 simplisafe-python==9.0.0
# homeassistant.components.sisyphus # homeassistant.components.sisyphus
sisyphus-control==2.2.1 sisyphus-control==2.2.1

View File

@ -629,7 +629,7 @@ sentry-sdk==0.13.5
simplehound==0.3 simplehound==0.3
# homeassistant.components.simplisafe # homeassistant.components.simplisafe
simplisafe-python==8.1.1 simplisafe-python==9.0.0
# homeassistant.components.sleepiq # homeassistant.components.sleepiq
sleepyq==0.7 sleepyq==0.7