Adjust device_automation type hints in nest (#72197)

This commit is contained in:
epenet 2022-05-20 08:27:24 +02:00 committed by GitHub
parent 5f7594268a
commit 85ef0e3bd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,10 @@ from homeassistant.components.automation import (
AutomationActionType, AutomationActionType,
AutomationTriggerInfo, AutomationTriggerInfo,
) )
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA from homeassistant.components.device_automation import (
DEVICE_TRIGGER_BASE_SCHEMA,
GetAutomationsResult,
)
from homeassistant.components.device_automation.exceptions import ( from homeassistant.components.device_automation.exceptions import (
InvalidDeviceAutomationConfig, InvalidDeviceAutomationConfig,
) )
@ -64,7 +67,7 @@ async def async_get_device_trigger_types(
async def async_get_triggers( async def async_get_triggers(
hass: HomeAssistant, device_id: str hass: HomeAssistant, device_id: str
) -> list[dict[str, str]]: ) -> GetAutomationsResult:
"""List device triggers for a Nest device.""" """List device triggers for a Nest device."""
nest_device_id = async_get_nest_device_id(hass, device_id) nest_device_id = async_get_nest_device_id(hass, device_id)
if not nest_device_id: if not nest_device_id: