mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-07-08 06:41:59 +00:00
docs: modernize docstrings across the repository (#1682)
Comprehensive docstring cleanup across the repository — fix Sphinx cross-references, Python REPL continuation syntax, stale class names, and modernize the IotBulb docstring to use the `Module.Light`/`Module.LightPreset` interface.
This commit is contained in:
@@ -41,14 +41,14 @@ class IotDimmer(IotPlug):
|
||||
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.
|
||||
adjusting the brightness. This class extends :class:`IotPlug` interface.
|
||||
|
||||
To initialize, you have to await :func:`update()` at least once.
|
||||
To initialize, you have to await :meth:`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.
|
||||
but you must await :meth:`update()` separately.
|
||||
|
||||
Errors reported by the device are raised as :class:`KasaException`\s,
|
||||
and should be handled by the user of the library.
|
||||
@@ -65,7 +65,7 @@ class IotDimmer(IotPlug):
|
||||
>>> dimmer.brightness
|
||||
50
|
||||
|
||||
Refer to :class:`SmartPlug` for the full API.
|
||||
Refer to :class:`IotPlug` for the full API.
|
||||
"""
|
||||
|
||||
DIMMER_SERVICE = "smartlife.iot.dimmer"
|
||||
|
||||
Reference in New Issue
Block a user