mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 03:33:35 +00:00
d30d00a3ff
* Preliminary support for light strips * Add color temperature range and cleanup, thanks to @darkoppressor * Use lightstrip instead of {led,light}strip consistently everywhere * The cli flag is now --lightstrip * add apidocs * Add fixture file for KL430 Signed-off-by: Kevin Wells <darkoppressor@gmail.com> * Add discovery support, expose effect and length of the strip * use set_light_state instead of transition_light_state * Add tests for lightstrip * add doctests * Add KL430 to supported devices in README Co-authored-by: Kevin Wells <darkoppressor@gmail.com>
41 lines
1.1 KiB
Python
Executable File
41 lines
1.1 KiB
Python
Executable File
"""Python interface for TP-Link's smart home devices.
|
|
|
|
All common, shared functionalities are available through `SmartDevice` class::
|
|
|
|
x = SmartDevice("192.168.1.1")
|
|
print(x.sys_info)
|
|
|
|
For device type specific actions `SmartBulb`, `SmartPlug`, or `SmartStrip`
|
|
should be used instead.
|
|
|
|
Module-specific errors are raised as `SmartDeviceException` and are expected
|
|
to be handled by the user of the library.
|
|
"""
|
|
from importlib_metadata import version # type: ignore
|
|
from kasa.discover import Discover
|
|
from kasa.exceptions import SmartDeviceException
|
|
from kasa.protocol import TPLinkSmartHomeProtocol
|
|
from kasa.smartbulb import SmartBulb
|
|
from kasa.smartdevice import DeviceType, EmeterStatus, SmartDevice
|
|
from kasa.smartdimmer import SmartDimmer
|
|
from kasa.smartlightstrip import SmartLightStrip
|
|
from kasa.smartplug import SmartPlug
|
|
from kasa.smartstrip import SmartStrip
|
|
|
|
__version__ = version("python-kasa")
|
|
|
|
|
|
__all__ = [
|
|
"Discover",
|
|
"TPLinkSmartHomeProtocol",
|
|
"SmartBulb",
|
|
"DeviceType",
|
|
"EmeterStatus",
|
|
"SmartDevice",
|
|
"SmartDeviceException",
|
|
"SmartPlug",
|
|
"SmartStrip",
|
|
"SmartDimmer",
|
|
"SmartLightStrip",
|
|
]
|