Rename bulb interface to light and move fan and light interface to interfaces (#910)

Also rename BulbPreset to LightPreset.
This commit is contained in:
Steven B
2024-05-11 19:40:08 +01:00
committed by GitHub
parent f259a8f162
commit d7b00336f4
11 changed files with 59 additions and 44 deletions

View File

@@ -16,7 +16,6 @@ from importlib.metadata import version
from typing import TYPE_CHECKING
from warnings import warn
from kasa.bulb import Bulb, BulbPreset
from kasa.credentials import Credentials
from kasa.device import Device
from kasa.device_type import DeviceType
@@ -36,6 +35,7 @@ from kasa.exceptions import (
UnsupportedDeviceError,
)
from kasa.feature import Feature
from kasa.interfaces.light import Light, LightPreset
from kasa.iotprotocol import (
IotProtocol,
_deprecated_TPLinkSmartHomeProtocol, # noqa: F401
@@ -52,14 +52,14 @@ __all__ = [
"BaseProtocol",
"IotProtocol",
"SmartProtocol",
"BulbPreset",
"LightPreset",
"TurnOnBehaviors",
"TurnOnBehavior",
"DeviceType",
"Feature",
"EmeterStatus",
"Device",
"Bulb",
"Light",
"Plug",
"Module",
"KasaException",
@@ -84,7 +84,7 @@ deprecated_smart_devices = {
"SmartLightStrip": iot.IotLightStrip,
"SmartStrip": iot.IotStrip,
"SmartDimmer": iot.IotDimmer,
"SmartBulbPreset": BulbPreset,
"SmartBulbPreset": LightPreset,
}
deprecated_exceptions = {
"SmartDeviceException": KasaException,
@@ -124,7 +124,7 @@ if TYPE_CHECKING:
SmartLightStrip = iot.IotLightStrip
SmartStrip = iot.IotStrip
SmartDimmer = iot.IotDimmer
SmartBulbPreset = BulbPreset
SmartBulbPreset = LightPreset
SmartDeviceException = KasaException
UnsupportedDeviceException = UnsupportedDeviceError