fixes #19814, Daikin config setting (#19823)

This commit is contained in:
Fredrik Erlandsson 2019-01-07 13:04:53 +01:00 committed by Fabian Affolter
parent e30c324b32
commit 3c465434cd

View File

@ -12,7 +12,7 @@ from socket import timeout
import async_timeout import async_timeout
import voluptuous as vol import voluptuous as vol
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import CONF_HOSTS from homeassistant.const import CONF_HOSTS
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
@ -51,12 +51,12 @@ async def async_setup(hass, config):
if not hosts: if not hosts:
hass.async_create_task( hass.async_create_task(
hass.config_entries.flow.async_init( hass.config_entries.flow.async_init(
DOMAIN, context={'source': config.SOURCE_IMPORT})) DOMAIN, context={'source': SOURCE_IMPORT}))
for host in hosts: for host in hosts:
hass.async_create_task( hass.async_create_task(
hass.config_entries.flow.async_init( hass.config_entries.flow.async_init(
DOMAIN, DOMAIN,
context={'source': config.SOURCE_IMPORT}, context={'source': SOURCE_IMPORT},
data={ data={
KEY_HOST: host, KEY_HOST: host,
})) }))