Update homekit_controller to use async zeroconf (#52330)
parent
1862cdf52e
commit
63c727ac6c
homeassistant/components/homekit_controller
|
@ -219,8 +219,10 @@ async def async_setup(hass, config):
|
|||
map_storage = hass.data[ENTITY_MAP] = EntityMapStorage(hass)
|
||||
await map_storage.async_initialize()
|
||||
|
||||
zeroconf_instance = await zeroconf.async_get_instance(hass)
|
||||
hass.data[CONTROLLER] = aiohomekit.Controller(zeroconf_instance=zeroconf_instance)
|
||||
async_zeroconf_instance = await zeroconf.async_get_async_instance(hass)
|
||||
hass.data[CONTROLLER] = aiohomekit.Controller(
|
||||
async_zeroconf_instance=async_zeroconf_instance
|
||||
)
|
||||
hass.data[KNOWN_DEVICES] = {}
|
||||
hass.data[TRIGGERS] = {}
|
||||
|
||||
|
|
|
@ -99,8 +99,10 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
async def _async_setup_controller(self):
|
||||
"""Create the controller."""
|
||||
zeroconf_instance = await zeroconf.async_get_instance(self.hass)
|
||||
self.controller = aiohomekit.Controller(zeroconf_instance=zeroconf_instance)
|
||||
async_zeroconf_instance = await zeroconf.async_get_async_instance(self.hass)
|
||||
self.controller = aiohomekit.Controller(
|
||||
async_zeroconf_instance=async_zeroconf_instance
|
||||
)
|
||||
|
||||
async def async_step_user(self, user_input=None):
|
||||
"""Handle a flow start."""
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "HomeKit Controller",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
||||
"requirements": ["aiohomekit==0.2.67"],
|
||||
"requirements": ["aiohomekit==0.4.0"],
|
||||
"zeroconf": ["_hap._tcp.local."],
|
||||
"after_dependencies": ["zeroconf"],
|
||||
"codeowners": ["@Jc2k", "@bdraco"],
|
||||
|
|
|
@ -175,7 +175,7 @@ aioguardian==1.0.4
|
|||
aioharmony==0.2.7
|
||||
|
||||
# homeassistant.components.homekit_controller
|
||||
aiohomekit==0.2.67
|
||||
aiohomekit==0.4.0
|
||||
|
||||
# homeassistant.components.emulated_hue
|
||||
# homeassistant.components.http
|
||||
|
|
|
@ -112,7 +112,7 @@ aioguardian==1.0.4
|
|||
aioharmony==0.2.7
|
||||
|
||||
# homeassistant.components.homekit_controller
|
||||
aiohomekit==0.2.67
|
||||
aiohomekit==0.4.0
|
||||
|
||||
# homeassistant.components.emulated_hue
|
||||
# homeassistant.components.http
|
||||
|
|
Loading…
Reference in New Issue