mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
28d41092e5
Brings consistency to the api across Smart and Iot so the interfaces can be used for their specialist methods as well as the device methods (e.g. turn_on/off).
21 lines
410 B
Python
21 lines
410 B
Python
"""Module for Fan Interface."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from .device import Device
|
|
|
|
|
|
class Fan(Device, ABC):
|
|
"""Interface for a Fan."""
|
|
|
|
@property
|
|
@abstractmethod
|
|
def fan_speed_level(self) -> int:
|
|
"""Return fan speed level."""
|
|
|
|
@abstractmethod
|
|
async def set_fan_speed_level(self, level: int):
|
|
"""Set fan speed level."""
|