Adjust device_automation type hints in homekit_controller (#72199)

This commit is contained in:
epenet 2022-05-19 22:22:09 +02:00 committed by GitHub
parent 3604bb4c66
commit ebc883b43f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,10 @@ from homeassistant.components.automation import (
AutomationActionType,
AutomationTriggerInfo,
)
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA
from homeassistant.components.device_automation import (
DEVICE_TRIGGER_BASE_SCHEMA,
GetAutomationsResult,
)
from homeassistant.const import CONF_DEVICE_ID, CONF_DOMAIN, CONF_PLATFORM, CONF_TYPE
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
from homeassistant.helpers.typing import ConfigType
@ -241,7 +244,7 @@ def async_fire_triggers(conn: HKDevice, events: dict[tuple[int, int], Any]):
async def async_get_triggers(
hass: HomeAssistant, device_id: str
) -> list[dict[str, str]]:
) -> GetAutomationsResult:
"""List device triggers for homekit devices."""
if device_id not in hass.data.get(TRIGGERS, {}):