mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Export modules & make sphinx happy (#334)
This commit is contained in:
parent
d848117384
commit
a39cef9a8c
@ -45,6 +45,7 @@ API documentation for modules
|
||||
*****************************
|
||||
|
||||
.. automodule:: kasa.modules
|
||||
:noindex:
|
||||
:members:
|
||||
:inherited-members:
|
||||
:undoc-members:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# flake8: noqa
|
||||
"""Module for individual feature modules."""
|
||||
from .ambientlight import AmbientLight
|
||||
from .antitheft import Antitheft
|
||||
from .cloud import Cloud
|
||||
@ -10,3 +10,18 @@ from .rulemodule import Rule, RuleModule
|
||||
from .schedule import Schedule
|
||||
from .time import Time
|
||||
from .usage import Usage
|
||||
|
||||
__all__ = [
|
||||
"AmbientLight",
|
||||
"Antitheft",
|
||||
"Cloud",
|
||||
"Countdown",
|
||||
"Emeter",
|
||||
"Module",
|
||||
"Motion",
|
||||
"Rule",
|
||||
"RuleModule",
|
||||
"Schedule",
|
||||
"Time",
|
||||
"Usage",
|
||||
]
|
||||
|
@ -42,7 +42,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SmartBulb(SmartDevice):
|
||||
"""Representation of a TP-Link Smart Bulb.
|
||||
r"""Representation of a TP-Link Smart Bulb.
|
||||
|
||||
To initialize, you have to await :func:`update()` at least once.
|
||||
This will allow accessing the properties using the exposed properties.
|
||||
@ -50,7 +50,7 @@ class SmartBulb(SmartDevice):
|
||||
All changes to the device are done using awaitable methods,
|
||||
which will not change the cached values, but you must await :func:`update()` separately.
|
||||
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`s,
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`\s,
|
||||
and should be handled by the user of the library.
|
||||
|
||||
Examples:
|
||||
@ -68,7 +68,7 @@ class SmartBulb(SmartDevice):
|
||||
>>> print(bulb.is_on)
|
||||
True
|
||||
|
||||
You can use the is_-prefixed properties to check for supported features
|
||||
You can use the ``is_``-prefixed properties to check for supported features
|
||||
>>> bulb.is_dimmable
|
||||
True
|
||||
>>> bulb.is_color
|
||||
|
@ -7,7 +7,7 @@ from kasa.smartplug import SmartPlug
|
||||
|
||||
|
||||
class SmartDimmer(SmartPlug):
|
||||
"""Representation of a TP-Link Smart Dimmer.
|
||||
r"""Representation of a TP-Link Smart Dimmer.
|
||||
|
||||
Dimmers work similarly to plugs, but provide also support for
|
||||
adjusting the brightness. This class extends :class:`SmartPlug` interface.
|
||||
@ -18,7 +18,7 @@ class SmartDimmer(SmartPlug):
|
||||
All changes to the device are done using awaitable methods,
|
||||
which will not change the cached values, but you must await :func:`update()` separately.
|
||||
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`s,
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`\s,
|
||||
and should be handled by the user of the library.
|
||||
|
||||
Examples:
|
||||
|
@ -9,7 +9,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SmartPlug(SmartDevice):
|
||||
"""Representation of a TP-Link Smart Switch.
|
||||
r"""Representation of a TP-Link Smart Switch.
|
||||
|
||||
To initialize, you have to await :func:`update()` at least once.
|
||||
This will allow accessing the properties using the exposed properties.
|
||||
@ -17,7 +17,7 @@ class SmartPlug(SmartDevice):
|
||||
All changes to the device are done using awaitable methods,
|
||||
which will not change the cached values, but you must await :func:`update()` separately.
|
||||
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`s,
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`\s,
|
||||
and should be handled by the user of the library.
|
||||
|
||||
Examples:
|
||||
|
@ -29,7 +29,7 @@ def merge_sums(dicts):
|
||||
|
||||
|
||||
class SmartStrip(SmartDevice):
|
||||
"""Representation of a TP-Link Smart Power Strip.
|
||||
r"""Representation of a TP-Link Smart Power Strip.
|
||||
|
||||
A strip consists of the parent device and its children.
|
||||
All methods of the parent act on all children, while the child devices
|
||||
@ -41,7 +41,7 @@ class SmartStrip(SmartDevice):
|
||||
All changes to the device are done using awaitable methods,
|
||||
which will not change the cached values, but you must await :func:`update()` separately.
|
||||
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`s,
|
||||
Errors reported by the device are raised as :class:`SmartDeviceException`\s,
|
||||
and should be handled by the user of the library.
|
||||
|
||||
Examples:
|
||||
|
Loading…
Reference in New Issue
Block a user