mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix zeroconf interface being ineffective in HomeKit (#34516)
This commit is contained in:
parent
193e9bec97
commit
6c3ea2a904
@ -153,7 +153,7 @@ async def async_setup(hass, config):
|
|||||||
entity_filter = conf[CONF_FILTER]
|
entity_filter = conf[CONF_FILTER]
|
||||||
entity_config = conf[CONF_ENTITY_CONFIG]
|
entity_config = conf[CONF_ENTITY_CONFIG]
|
||||||
interface_choice = (
|
interface_choice = (
|
||||||
InterfaceChoice.Default if config.get(CONF_ZEROCONF_DEFAULT_INTERFACE) else None
|
InterfaceChoice.Default if conf.get(CONF_ZEROCONF_DEFAULT_INTERFACE) else None
|
||||||
)
|
)
|
||||||
|
|
||||||
homekit = HomeKit(
|
homekit = HomeKit(
|
||||||
|
@ -21,6 +21,7 @@ from homeassistant.components.homekit.const import (
|
|||||||
BRIDGE_NAME,
|
BRIDGE_NAME,
|
||||||
CONF_AUTO_START,
|
CONF_AUTO_START,
|
||||||
CONF_SAFE_MODE,
|
CONF_SAFE_MODE,
|
||||||
|
CONF_ZEROCONF_DEFAULT_INTERFACE,
|
||||||
DEFAULT_PORT,
|
DEFAULT_PORT,
|
||||||
DEFAULT_SAFE_MODE,
|
DEFAULT_SAFE_MODE,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@ -97,6 +98,7 @@ async def test_setup_auto_start_disabled(hass):
|
|||||||
CONF_PORT: 11111,
|
CONF_PORT: 11111,
|
||||||
CONF_IP_ADDRESS: "172.0.0.0",
|
CONF_IP_ADDRESS: "172.0.0.0",
|
||||||
CONF_SAFE_MODE: DEFAULT_SAFE_MODE,
|
CONF_SAFE_MODE: DEFAULT_SAFE_MODE,
|
||||||
|
CONF_ZEROCONF_DEFAULT_INTERFACE: True,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +108,15 @@ async def test_setup_auto_start_disabled(hass):
|
|||||||
assert await setup.async_setup_component(hass, DOMAIN, config)
|
assert await setup.async_setup_component(hass, DOMAIN, config)
|
||||||
|
|
||||||
mock_homekit.assert_any_call(
|
mock_homekit.assert_any_call(
|
||||||
hass, "Test Name", 11111, "172.0.0.0", ANY, {}, DEFAULT_SAFE_MODE, None, None
|
hass,
|
||||||
|
"Test Name",
|
||||||
|
11111,
|
||||||
|
"172.0.0.0",
|
||||||
|
ANY,
|
||||||
|
{},
|
||||||
|
DEFAULT_SAFE_MODE,
|
||||||
|
None,
|
||||||
|
InterfaceChoice.Default,
|
||||||
)
|
)
|
||||||
assert mock_homekit().setup.called is True
|
assert mock_homekit().setup.called is True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user