1 parent
37706c2731
commit
7f0a50ce31
41 files changed
+76
-72
No files matched your search
@@ -79,7 +79,7 @@ class CloudIoT:
|
||||
|
||||
try:
|
||||
# Sleep 2^tries seconds between retries
|
||||
self.retry_task = hass.async_add_job(asyncio.sleep(
|
||||
self.retry_task = hass.async_create_task(asyncio.sleep(
|
||||
2**min(9, self.tries), loop=hass.loop))
|
||||
yield from self.retry_task
|
||||
self.retry_task = None
|
||||
@@ -106,7 +106,7 @@ class CloudIoT:
|
||||
'cloud_subscription_expired')
|
||||
|
||||
# Don't await it because it will cancel this task
|
||||
hass.async_add_job(self.cloud.logout())
|
||||
hass.async_create_task(self.cloud.logout())
|
||||
return
|
||||
except auth_api.CloudError as err:
|
||||
_LOGGER.warning("Unable to refresh token: %s", err)
|
||||
|
||||
Reference in new issue
Block a user