Add cloud account linking support (#28210)

* Add cloud account linking support

* Update account_link.py
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-10-25 16:04:24 -07:00
1 parent 475b43500a
commit 08cc9fd375
13 files changed
+407 -21

No files matched your search

+6 -2
View File
@@ -20,7 +20,7 @@ from homeassistant.helpers import config_validation as cv, entityfilter
from homeassistant.loader import bind_hass
from homeassistant.util.aiohttp import MockRequest
from . import http_api
from . import account_link, http_api
from .client import CloudClient
from .const import (
CONF_ACME_DIRECTORY_SERVER,
@@ -38,6 +38,7 @@ from .const import (
CONF_REMOTE_API_URL,
CONF_SUBSCRIPTION_INFO_URL,
CONF_USER_POOL_ID,
CONF_ACCOUNT_LINK_URL,
DOMAIN,
MODE_DEV,
MODE_PROD,
@@ -101,6 +102,7 @@ CONFIG_SCHEMA = vol.Schema(
vol.Optional(CONF_GOOGLE_ACTIONS): GACTIONS_SCHEMA,
vol.Optional(CONF_ALEXA_ACCESS_TOKEN_URL): vol.Url(),
vol.Optional(CONF_GOOGLE_ACTIONS_REPORT_STATE_URL): vol.Url(),
vol.Optional(CONF_ACCOUNT_LINK_URL): vol.Url(),
}
)
},
@@ -168,7 +170,6 @@ def is_cloudhook_request(request):
async def async_setup(hass, config):
"""Initialize the Home Assistant cloud."""
# Process configs
if DOMAIN in config:
kwargs = dict(config[DOMAIN])
@@ -248,4 +249,7 @@ async def async_setup(hass, config):
cloud.iot.register_on_connect(_on_connect)
await http_api.async_setup(hass)
account_link.async_setup(hass)
return True