Use the shared zeroconf instance when attempting to create another Zeroconf instance (#38744)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-12 16:08:33 +02:00
1 parent 34cb12d3c9
commit 444df4a7d2
8 files changed
+187 -17

No files matched your search

@@ -30,6 +30,8 @@ from homeassistant.helpers.network import NoURLAvailableError, get_url
from homeassistant.helpers.singleton import singleton
from homeassistant.loader import async_get_homekit, async_get_zeroconf
from .usage import install_multiple_zeroconf_catcher
_LOGGER = logging.getLogger(__name__)
DOMAIN = "zeroconf"
@@ -135,6 +137,8 @@ def setup(hass, config):
ipv6=zc_config.get(CONF_IPV6, DEFAULT_IPV6),
)
install_multiple_zeroconf_catcher(zeroconf)
# Get instance UUID
uuid = asyncio.run_coroutine_threadsafe(
hass.helpers.instance_id.async_get(), hass.loop