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:
parent
43757ecea5
commit
9234852e2a
1 changed files with 2 additions and 2 deletions
|
@ -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] = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue