From 9234852e2ab85577a1bb0ea1749251a2131a4b63 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sat, 23 Dec 2023 19:42:41 +0100 Subject: [PATCH] Improve typing on drop_connect switch entity description (#106314) * Improve typing on drop_connext switch entity description * Update homeassistant/components/drop_connect/switch.py Co-authored-by: Joost Lekkerkerker * Update homeassistant/components/drop_connect/switch.py Co-authored-by: Joost Lekkerkerker --------- Co-authored-by: Joost Lekkerkerker --- homeassistant/components/drop_connect/switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/drop_connect/switch.py b/homeassistant/components/drop_connect/switch.py index 1cd7fbf39f4..b0ebe4b5a85 100644 --- a/homeassistant/components/drop_connect/switch.py +++ b/homeassistant/components/drop_connect/switch.py @@ -2,7 +2,7 @@ from __future__ import annotations -from collections.abc import Callable +from collections.abc import Awaitable, Callable from dataclasses import dataclass import logging from typing import Any @@ -42,7 +42,7 @@ class DROPSwitchEntityDescription(SwitchEntityDescription): """Describes DROP switch entity.""" value_fn: Callable[[DROPDeviceDataUpdateCoordinator], int | None] - set_fn: Callable + set_fn: Callable[[DROPDeviceDataUpdateCoordinator, int], Awaitable[Any]] SWITCHES: list[DROPSwitchEntityDescription] = [