Add type hints to homekit events fixture (#121211)

This commit is contained in:
epenet
2024-07-04 16:32:01 +02:00
committed by GitHub
parent 411630429d
commit 28f06cb5a0
16 changed files with 182 additions and 144 deletions

View File

@@ -12,7 +12,7 @@ from homeassistant.components.device_tracker.legacy import YAML_DEVICES
from homeassistant.components.homekit.accessories import HomeDriver
from homeassistant.components.homekit.const import BRIDGE_NAME, EVENT_HOMEKIT_CHANGED
from homeassistant.components.homekit.iidmanager import AccessoryIIDStorage
from homeassistant.core import HomeAssistant
from homeassistant.core import Event, HomeAssistant
from tests.common import async_capture_events
@@ -121,7 +121,7 @@ def mock_hap(
@pytest.fixture
def events(hass):
def events(hass: HomeAssistant) -> list[Event]:
"""Yield caught homekit_changed events."""
return async_capture_events(hass, EVENT_HOMEKIT_CHANGED)