mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Make Light and Fan a common module interface (#911)
This commit is contained in:
@@ -15,9 +15,8 @@ from .feature import Feature
|
||||
from .modulemapping import ModuleName
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from . import interfaces
|
||||
from .device import Device
|
||||
from .interfaces.led import Led
|
||||
from .interfaces.lighteffect import LightEffect
|
||||
from .iot import modules as iot
|
||||
from .smart import modules as smart
|
||||
|
||||
@@ -34,8 +33,9 @@ class Module(ABC):
|
||||
"""
|
||||
|
||||
# Common Modules
|
||||
LightEffect: Final[ModuleName[LightEffect]] = ModuleName("LightEffect")
|
||||
Led: Final[ModuleName[Led]] = ModuleName("Led")
|
||||
LightEffect: Final[ModuleName[interfaces.LightEffect]] = ModuleName("LightEffect")
|
||||
Led: Final[ModuleName[interfaces.Led]] = ModuleName("Led")
|
||||
Light: Final[ModuleName[interfaces.Light]] = ModuleName("Light")
|
||||
|
||||
# IOT only Modules
|
||||
IotAmbientLight: Final[ModuleName[iot.AmbientLight]] = ModuleName("ambient")
|
||||
|
Reference in New Issue
Block a user