Ensure shared zeroconf is passed to homekit controller devices (#38678)

pull/38575/head
J. Nick Koston 2020-08-08 15:37:05 -05:00 committed by GitHub
parent 02d572aae5
commit e304792f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ from aiohomekit.model.characteristics import (
)
from aiohomekit.model.services import Service, ServicesTypes
from homeassistant.components import zeroconf
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity import Entity
@ -212,7 +213,8 @@ async def async_setup(hass, config):
map_storage = hass.data[ENTITY_MAP] = EntityMapStorage(hass)
await map_storage.async_initialize()
hass.data[CONTROLLER] = aiohomekit.Controller()
zeroconf_instance = await zeroconf.async_get_instance(hass)
hass.data[CONTROLLER] = aiohomekit.Controller(zeroconf_instance=zeroconf_instance)
hass.data[KNOWN_DEVICES] = {}
return True