2024-04-30 16:42:53 +00:00
|
|
|
"""Module for Fan Interface."""
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from abc import ABC, abstractmethod
|
2024-11-22 20:21:29 +00:00
|
|
|
from typing import Annotated
|
2024-04-30 16:42:53 +00:00
|
|
|
|
2024-11-22 20:21:29 +00:00
|
|
|
from ..module import FeatureAttribute, Module
|
2024-04-30 16:42:53 +00:00
|
|
|
|
|
|
|
|
2024-05-13 16:34:44 +00:00
|
|
|
class Fan(Module, ABC):
|
2024-05-02 12:55:08 +00:00
|
|
|
"""Interface for a Fan."""
|
2024-04-30 16:42:53 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
2024-11-22 20:21:29 +00:00
|
|
|
def fan_speed_level(self) -> Annotated[int, FeatureAttribute()]:
|
2024-04-30 16:42:53 +00:00
|
|
|
"""Return fan speed level."""
|
|
|
|
|
|
|
|
@abstractmethod
|
2024-11-22 20:21:29 +00:00
|
|
|
async def set_fan_speed_level(
|
|
|
|
self, level: int
|
|
|
|
) -> Annotated[dict, FeatureAttribute()]:
|
2024-04-30 16:42:53 +00:00
|
|
|
"""Set fan speed level."""
|