mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-16 12:28:02 +00:00
Add DeviceConfig to allow specifying configuration parameters (#569)
* Add DeviceConfig handling * Update post review * Further update post latest review * Update following latest review * Update docstrings and docs
This commit is contained in:
@@ -23,9 +23,12 @@ This will return you a list of device instances based on the discovery replies.
|
||||
If the device's host is already known, you can use to construct a device instance with
|
||||
:meth:`~kasa.SmartDevice.connect()`.
|
||||
|
||||
When connecting a device with the :meth:`~kasa.SmartDevice.connect()` method, it is recommended to
|
||||
pass the device type as well as this allows the library to use the correct device class for the
|
||||
device without having to query the device.
|
||||
The :meth:`~kasa.SmartDevice.connect()` also enables support for connecting to new
|
||||
KASA SMART protocol and TAPO devices directly using the parameter :class:`~kasa.DeviceConfig`.
|
||||
Simply serialize the :attr:`~kasa.SmartDevice.config` property via :meth:`~kasa.DeviceConfig.to_dict()`
|
||||
and then deserialize it later with :func:`~kasa.DeviceConfig.from_dict()`
|
||||
and then pass it into :meth:`~kasa.SmartDevice.connect()`.
|
||||
|
||||
|
||||
.. _update_cycle:
|
||||
|
||||
|
Reference in New Issue
Block a user