FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Annotate fan_speed_level of Fan interface by sdb9696 · Pull Request #1298 · python-kasa/python-kasa · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 6 additions & 3 deletions kasa/interfaces/fan.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
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):
"""Interface for a Fan."""

@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."""

Back | FazBrowse Home | New Git URL