Upgrade hass_nabucasa to 0.32.2 (#32522)
* Upgrade hass_nabucasa to 32.1 * Fix tests * Update hass-nabucasa to 0.32.2 Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
parent
87b770be08
commit
8a46d93be4
6 changed files with 20 additions and 19 deletions
|
@ -236,9 +236,7 @@ class CloudRegisterView(HomeAssistantView):
|
|||
cloud = hass.data[DOMAIN]
|
||||
|
||||
with async_timeout.timeout(REQUEST_TIMEOUT):
|
||||
await hass.async_add_job(
|
||||
cloud.auth.register, data["email"], data["password"]
|
||||
)
|
||||
await cloud.auth.async_register(data["email"], data["password"])
|
||||
|
||||
return self.json_message("ok")
|
||||
|
||||
|
@ -257,7 +255,7 @@ class CloudResendConfirmView(HomeAssistantView):
|
|||
cloud = hass.data[DOMAIN]
|
||||
|
||||
with async_timeout.timeout(REQUEST_TIMEOUT):
|
||||
await hass.async_add_job(cloud.auth.resend_email_confirm, data["email"])
|
||||
await cloud.auth.async_resend_email_confirm(data["email"])
|
||||
|
||||
return self.json_message("ok")
|
||||
|
||||
|
@ -276,7 +274,7 @@ class CloudForgotPasswordView(HomeAssistantView):
|
|||
cloud = hass.data[DOMAIN]
|
||||
|
||||
with async_timeout.timeout(REQUEST_TIMEOUT):
|
||||
await hass.async_add_job(cloud.auth.forgot_password, data["email"])
|
||||
await cloud.auth.async_forgot_password(data["email"])
|
||||
|
||||
return self.json_message("ok")
|
||||
|
||||
|
@ -336,7 +334,7 @@ async def websocket_subscription(hass, connection, msg):
|
|||
# In that case, let's refresh and reconnect
|
||||
if data.get("provider") and not cloud.is_connected:
|
||||
_LOGGER.debug("Found disconnected account with valid subscriotion, connecting")
|
||||
await hass.async_add_executor_job(cloud.auth.renew_access_token)
|
||||
await cloud.auth.async_renew_access_token()
|
||||
|
||||
# Cancel reconnect in progress
|
||||
if cloud.iot.state != STATE_DISCONNECTED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue