mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Adjust device_automation type hints in webostv (#72200)
This commit is contained in:
parent
a57697d6e9
commit
7005526892
@ -7,7 +7,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.components.device_automation.exceptions import (
|
||||
InvalidDeviceAutomationConfig,
|
||||
)
|
||||
@ -58,7 +61,7 @@ async def async_validate_trigger_config(
|
||||
|
||||
async def async_get_triggers(
|
||||
_hass: HomeAssistant, device_id: str
|
||||
) -> list[dict[str, str]]:
|
||||
) -> GetAutomationsResult:
|
||||
"""List device triggers for device."""
|
||||
triggers = []
|
||||
base_trigger = {
|
||||
@ -77,7 +80,7 @@ async def async_attach_trigger(
|
||||
config: ConfigType,
|
||||
action: AutomationActionType,
|
||||
automation_info: AutomationTriggerInfo,
|
||||
) -> CALLBACK_TYPE | None:
|
||||
) -> CALLBACK_TYPE:
|
||||
"""Attach a trigger."""
|
||||
if (trigger_type := config[CONF_TYPE]) == TURN_ON_PLATFORM_TYPE:
|
||||
trigger_config = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user