mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Ensure shared zeroconf is passed to homekit controller devices (#38678)
This commit is contained in:
parent
02d572aae5
commit
e304792f3a
@ -11,6 +11,7 @@ from aiohomekit.model.characteristics import (
|
|||||||
)
|
)
|
||||||
from aiohomekit.model.services import Service, ServicesTypes
|
from aiohomekit.model.services import Service, ServicesTypes
|
||||||
|
|
||||||
|
from homeassistant.components import zeroconf
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
@ -212,7 +213,8 @@ async def async_setup(hass, config):
|
|||||||
map_storage = hass.data[ENTITY_MAP] = EntityMapStorage(hass)
|
map_storage = hass.data[ENTITY_MAP] = EntityMapStorage(hass)
|
||||||
await map_storage.async_initialize()
|
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] = {}
|
hass.data[KNOWN_DEVICES] = {}
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user