allow overriding host api url in config flow (#33481)

* allow overriding host api url in config flow

* fix typo

* capitalize URL
This commit is contained in:
Kit Klein 2020-03-31 18:50:37 -04:00 committed by GitHub
parent b892dbc6ea
commit 955c94e313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 91 additions and 20 deletions

View file

@ -43,6 +43,7 @@ async def test_config_schema(hass):
"""Test that config schema is imported properly."""
config = {
konnected.DOMAIN: {
konnected.CONF_API_HOST: "http://1.1.1.1:8888",
konnected.CONF_ACCESS_TOKEN: "abcdefgh",
konnected.CONF_DEVICES: [{konnected.CONF_ID: "aabbccddeeff"}],
}
@ -50,10 +51,12 @@ async def test_config_schema(hass):
assert konnected.CONFIG_SCHEMA(config) == {
"konnected": {
"access_token": "abcdefgh",
"api_host": "http://1.1.1.1:8888",
"devices": [
{
"default_options": {
"blink": True,
"api_host": "http://1.1.1.1:8888",
"discovery": True,
"io": {
"1": "Disabled",
@ -96,6 +99,7 @@ async def test_config_schema(hass):
{
"default_options": {
"blink": True,
"api_host": "",
"discovery": True,
"io": {
"1": "Disabled",
@ -162,6 +166,7 @@ async def test_config_schema(hass):
{
"default_options": {
"blink": True,
"api_host": "",
"discovery": True,
"io": {
"1": "Binary Sensor",