Ensure shared zeroconf is passed to homekit controller devices (#38678)
parent
02d572aae5
commit
e304792f3a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue