mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Annotate fan_speed_level of Fan interface (#1298)
This commit is contained in:
parent
f4316110c9
commit
b525d6a35c
@ -3,8 +3,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Annotated
|
||||
|
||||
from ..module import Module
|
||||
from ..module import FeatureAttribute, Module
|
||||
|
||||
|
||||
class Fan(Module, ABC):
|
||||
@ -12,9 +13,11 @@ class Fan(Module, ABC):
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def fan_speed_level(self) -> int:
|
||||
def fan_speed_level(self) -> Annotated[int, FeatureAttribute()]:
|
||||
"""Return fan speed level."""
|
||||
|
||||
@abstractmethod
|
||||
async def set_fan_speed_level(self, level: int) -> dict:
|
||||
async def set_fan_speed_level(
|
||||
self, level: int
|
||||
) -> Annotated[dict, FeatureAttribute()]:
|
||||
"""Set fan speed level."""
|
||||
|
Loading…
Reference in New Issue
Block a user