From 700552689270020eb56bf43de937554ba5755929 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 19 May 2022 21:33:01 +0200 Subject: [PATCH] Adjust device_automation type hints in webostv (#72200) --- homeassistant/components/webostv/device_trigger.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/webostv/device_trigger.py b/homeassistant/components/webostv/device_trigger.py index feb5bae98fe..9836f561b9d 100644 --- a/homeassistant/components/webostv/device_trigger.py +++ b/homeassistant/components/webostv/device_trigger.py @@ -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 = {