Use system zeroconf singleton for homekit (#35502)
Zeroconf instances are expensive so we share a single instance instead of running multiple.
This commit is contained in:
parent
48899c7a1c
commit
751529feca
4 changed files with 41 additions and 1 deletions
|
@ -29,3 +29,10 @@ def events(hass):
|
|||
EVENT_HOMEKIT_CHANGED, ha_callback(lambda e: events.append(e))
|
||||
)
|
||||
yield events
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_zeroconf():
|
||||
"""Mock zeroconf."""
|
||||
with patch("homeassistant.components.zeroconf.HaZeroconf") as mock_zc:
|
||||
yield mock_zc.return_value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue