Update cloud auth (#9357)
* Update cloud logic * Lint * Update test requirements * Address commments, fix tests * Add credentials
This commit is contained in:
1 parent
90f9a6bc0a
commit
c9fc3fae6e
12 files changed
+1047
-822
No files matched your search
@@ -4,10 +4,11 @@ import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from . import http_api, cloud_api
|
||||
from . import http_api, auth_api
|
||||
from .const import DOMAIN
|
||||
|
||||
|
||||
REQUIREMENTS = ['warrant==0.2.0']
|
||||
DEPENDENCIES = ['http']
|
||||
CONF_MODE = 'mode'
|
||||
MODE_DEV = 'development'
|
||||
@@ -40,10 +41,7 @@ def async_setup(hass, config):
|
||||
'mode': mode
|
||||
}
|
||||
|
||||
cloud = yield from cloud_api.async_load_auth(hass)
|
||||
|
||||
if cloud is not None:
|
||||
data['cloud'] = cloud
|
||||
data['auth'] = yield from hass.async_add_job(auth_api.load_auth, hass)
|
||||
|
||||
yield from http_api.async_setup(hass)
|
||||
return True
|
||||
Reference in new issue
Block a user