mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Update homekit_controller to use async zeroconf (#52330)
This commit is contained in:
parent
1862cdf52e
commit
63c727ac6c
@ -219,8 +219,10 @@ 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()
|
||||||
|
|
||||||
zeroconf_instance = await zeroconf.async_get_instance(hass)
|
async_zeroconf_instance = await zeroconf.async_get_async_instance(hass)
|
||||||
hass.data[CONTROLLER] = aiohomekit.Controller(zeroconf_instance=zeroconf_instance)
|
hass.data[CONTROLLER] = aiohomekit.Controller(
|
||||||
|
async_zeroconf_instance=async_zeroconf_instance
|
||||||
|
)
|
||||||
hass.data[KNOWN_DEVICES] = {}
|
hass.data[KNOWN_DEVICES] = {}
|
||||||
hass.data[TRIGGERS] = {}
|
hass.data[TRIGGERS] = {}
|
||||||
|
|
||||||
|
@ -99,8 +99,10 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
async def _async_setup_controller(self):
|
async def _async_setup_controller(self):
|
||||||
"""Create the controller."""
|
"""Create the controller."""
|
||||||
zeroconf_instance = await zeroconf.async_get_instance(self.hass)
|
async_zeroconf_instance = await zeroconf.async_get_async_instance(self.hass)
|
||||||
self.controller = aiohomekit.Controller(zeroconf_instance=zeroconf_instance)
|
self.controller = aiohomekit.Controller(
|
||||||
|
async_zeroconf_instance=async_zeroconf_instance
|
||||||
|
)
|
||||||
|
|
||||||
async def async_step_user(self, user_input=None):
|
async def async_step_user(self, user_input=None):
|
||||||
"""Handle a flow start."""
|
"""Handle a flow start."""
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "HomeKit Controller",
|
"name": "HomeKit Controller",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
||||||
"requirements": ["aiohomekit==0.2.67"],
|
"requirements": ["aiohomekit==0.4.0"],
|
||||||
"zeroconf": ["_hap._tcp.local."],
|
"zeroconf": ["_hap._tcp.local."],
|
||||||
"after_dependencies": ["zeroconf"],
|
"after_dependencies": ["zeroconf"],
|
||||||
"codeowners": ["@Jc2k", "@bdraco"],
|
"codeowners": ["@Jc2k", "@bdraco"],
|
||||||
|
@ -175,7 +175,7 @@ aioguardian==1.0.4
|
|||||||
aioharmony==0.2.7
|
aioharmony==0.2.7
|
||||||
|
|
||||||
# homeassistant.components.homekit_controller
|
# homeassistant.components.homekit_controller
|
||||||
aiohomekit==0.2.67
|
aiohomekit==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.emulated_hue
|
# homeassistant.components.emulated_hue
|
||||||
# homeassistant.components.http
|
# homeassistant.components.http
|
||||||
|
@ -112,7 +112,7 @@ aioguardian==1.0.4
|
|||||||
aioharmony==0.2.7
|
aioharmony==0.2.7
|
||||||
|
|
||||||
# homeassistant.components.homekit_controller
|
# homeassistant.components.homekit_controller
|
||||||
aiohomekit==0.2.67
|
aiohomekit==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.emulated_hue
|
# homeassistant.components.emulated_hue
|
||||||
# homeassistant.components.http
|
# homeassistant.components.http
|
||||||
|
Loading…
x
Reference in New Issue
Block a user