Skip to content

Commit

Permalink
Ensure shared zeroconf is passed to homekit controller devices (#38678)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored and balloob committed Aug 9, 2020
1 parent aa4e879 commit f1e3023
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/homekit_controller/__init__.py
Expand Up @@ -11,6 +11,7 @@
)
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f1e3023

Please sign in to comment.