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 <joostlek@outlook.com>

* Update homeassistant/components/drop_connect/switch.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Jan Bouwhuis 2023-12-23 19:42:41 +01:00 committed by GitHub
parent 43757ecea5
commit 9234852e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Awaitable, Callable
from dataclasses import dataclass from dataclasses import dataclass
import logging import logging
from typing import Any from typing import Any
@ -42,7 +42,7 @@ class DROPSwitchEntityDescription(SwitchEntityDescription):
"""Describes DROP switch entity.""" """Describes DROP switch entity."""
value_fn: Callable[[DROPDeviceDataUpdateCoordinator], int | None] value_fn: Callable[[DROPDeviceDataUpdateCoordinator], int | None]
set_fn: Callable set_fn: Callable[[DROPDeviceDataUpdateCoordinator, int], Awaitable[Any]]
SWITCHES: list[DROPSwitchEntityDescription] = [ SWITCHES: list[DROPSwitchEntityDescription] = [