From 3390d62b3dffb13fc729016bb470cc6cac6a5831 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 22 May 2022 20:53:00 +0200 Subject: [PATCH] Revert "Adjust device_automation type hints in deconz" (#72323) Revert "Adjust device_automation type hints in deconz (#72194)" This reverts commit a57697d6e98a5a267f8eb60cb333b6a8dcc360c3. --- homeassistant/components/deconz/device_trigger.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/deconz/device_trigger.py b/homeassistant/components/deconz/device_trigger.py index 2ab1b2e6544..43ed3b2cdc4 100644 --- a/homeassistant/components/deconz/device_trigger.py +++ b/homeassistant/components/deconz/device_trigger.py @@ -1,16 +1,16 @@ """Provides device automations for deconz events.""" + from __future__ import annotations +from typing import Any + import voluptuous as vol from homeassistant.components.automation import ( AutomationActionType, AutomationTriggerInfo, ) -from homeassistant.components.device_automation import ( - DEVICE_TRIGGER_BASE_SCHEMA, - GetAutomationsResult, -) +from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA from homeassistant.components.device_automation.exceptions import ( InvalidDeviceAutomationConfig, ) @@ -642,8 +642,9 @@ def _get_deconz_event_from_device( async def async_validate_trigger_config( - hass: HomeAssistant, config: ConfigType -) -> ConfigType: + hass: HomeAssistant, + config: dict[str, Any], +) -> vol.Schema: """Validate config.""" config = TRIGGER_SCHEMA(config) @@ -702,7 +703,7 @@ async def async_attach_trigger( async def async_get_triggers( hass: HomeAssistant, device_id: str, -) -> GetAutomationsResult: +) -> list[dict[str, str]]: """List device triggers. Make sure device is a supported remote model.