mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
b73c0d222e
* Move dimmer support to its own class SmartDimmer extends SmartPlug with brightness settings. This will make the API of SmartPlug less confusing and will make it simpler to downstream users to act with dimmers. Fixes #33 * Lint & make tests pass * Fix rebase after cache and emeter cleanups, hopefully everything went smoothly.. * oopsie, has_emeter was mistakenly included in smartplug
34 lines
963 B
Python
Executable File
34 lines
963 B
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 kasa.discover import Discover
|
|
from kasa.protocol import TPLinkSmartHomeProtocol
|
|
from kasa.smartbulb import SmartBulb
|
|
from kasa.smartdevice import DeviceType, EmeterStatus, SmartDevice, SmartDeviceException
|
|
from kasa.smartdimmer import SmartDimmer
|
|
from kasa.smartplug import SmartPlug
|
|
from kasa.smartstrip import SmartStrip
|
|
|
|
__all__ = [
|
|
"Discover",
|
|
"TPLinkSmartHomeProtocol",
|
|
"SmartBulb",
|
|
"DeviceType",
|
|
"EmeterStatus",
|
|
"SmartDevice",
|
|
"SmartDeviceException",
|
|
"SmartPlug",
|
|
"SmartStrip",
|
|
"SmartDimmer",
|
|
]
|