Prepare for new aiohomekit lifecycle API (#66340)

This commit is contained in:
Jc2k
2022-02-11 19:26:35 +00:00
committed by GitHub
parent 2f220b27d4
commit 0daf20c0cc
11 changed files with 79 additions and 28 deletions

View File

@@ -20,6 +20,7 @@ from homeassistant.helpers.device_registry import (
)
from .const import DOMAIN, KNOWN_DEVICES
from .utils import async_get_controller
HOMEKIT_DIR = ".homekit"
HOMEKIT_BRIDGE_DOMAIN = "homekit"
@@ -104,10 +105,7 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
async def _async_setup_controller(self):
"""Create the controller."""
async_zeroconf_instance = await zeroconf.async_get_async_instance(self.hass)
self.controller = aiohomekit.Controller(
async_zeroconf_instance=async_zeroconf_instance
)
self.controller = await async_get_controller(self.hass)
async def async_step_user(self, user_input=None):
"""Handle a flow start."""