mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
parent
e30c324b32
commit
3c465434cd
@ -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,
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user