mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Rename bulb interface to light and move fan and light interface to interfaces (#910)
Also rename BulbPreset to LightPreset.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user