Merge branch 'master' into feat/light_module_feats

This commit is contained in:
Steven B. 2024-11-22 20:35:18 +00:00 committed by GitHub
commit 157eb24a2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
79 changed files with 9 additions and 6 deletions

View File

@ -56,7 +56,7 @@ FixtureResult = namedtuple("FixtureResult", "filename, folder, data")
SMART_FOLDER = "tests/fixtures/smart/" SMART_FOLDER = "tests/fixtures/smart/"
SMARTCAMERA_FOLDER = "tests/fixtures/smartcamera/" SMARTCAMERA_FOLDER = "tests/fixtures/smartcamera/"
SMART_CHILD_FOLDER = "tests/fixtures/smart/child/" SMART_CHILD_FOLDER = "tests/fixtures/smart/child/"
IOT_FOLDER = "tests/fixtures/" IOT_FOLDER = "tests/fixtures/iot/"
ENCRYPT_TYPES = [encrypt_type.value for encrypt_type in DeviceEncryptionType] ENCRYPT_TYPES = [encrypt_type.value for encrypt_type in DeviceEncryptionType]

View File

@ -45,7 +45,7 @@ DEVICE_TYPE_TO_PRODUCT_GROUP = {
SUPPORTED_FILENAME = "SUPPORTED.md" SUPPORTED_FILENAME = "SUPPORTED.md"
README_FILENAME = "README.md" README_FILENAME = "README.md"
IOT_FOLDER = "tests/fixtures/" IOT_FOLDER = "tests/fixtures/iot/"
SMART_FOLDER = "tests/fixtures/smart/" SMART_FOLDER = "tests/fixtures/smart/"
SMART_CHILD_FOLDER = "tests/fixtures/smart/child" SMART_CHILD_FOLDER = "tests/fixtures/smart/child"
SMARTCAMERA_FOLDER = "tests/fixtures/smartcamera/" SMARTCAMERA_FOLDER = "tests/fixtures/smartcamera/"

View File

@ -3,8 +3,9 @@
from __future__ import annotations from __future__ import annotations
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Annotated
from ..module import Module from ..module import FeatureAttribute, Module
class Fan(Module, ABC): class Fan(Module, ABC):
@ -12,9 +13,11 @@ class Fan(Module, ABC):
@property @property
@abstractmethod @abstractmethod
def fan_speed_level(self) -> int: def fan_speed_level(self) -> Annotated[int, FeatureAttribute()]:
"""Return fan speed level.""" """Return fan speed level."""
@abstractmethod @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.""" """Set fan speed level."""

View File

@ -35,7 +35,7 @@ FixtureInfo.__eq__ = lambda x, y: hash(x) == hash(y) # type: ignore[method-assi
SUPPORTED_IOT_DEVICES = [ SUPPORTED_IOT_DEVICES = [
(device, "IOT") (device, "IOT")
for device in glob.glob( for device in glob.glob(
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/*.json" os.path.dirname(os.path.abspath(__file__)) + "/fixtures/iot/*.json"
) )
] ]