Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ API documentation for modules
*****************************

.. automodule:: kasa.modules
:noindex:
:members:
:inherited-members:
:undoc-members:
17 changes: 16 additions & 1 deletion kasa/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# flake8: noqa
"""Module for individual feature modules."""
from .ambientlight import AmbientLight
from .antitheft import Antitheft
from .cloud import Cloud
Expand All @@ -10,3 +10,18 @@
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",
]
6 changes: 3 additions & 3 deletions kasa/smartbulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class HSV(NamedTuple):


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.

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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions kasa/smartdimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


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.
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions kasa/smartplug.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@


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.

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:
Expand Down
4 changes: 2 additions & 2 deletions kasa/smartstrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down