2020-06-30 00:29:52 +00:00
|
|
|
Bulbs
|
|
|
|
===========
|
|
|
|
|
2022-10-18 17:08:10 +00:00
|
|
|
.. contents:: Contents
|
|
|
|
:local:
|
|
|
|
|
2020-12-09 09:13:14 +00:00
|
|
|
Supported features
|
|
|
|
******************
|
|
|
|
|
|
|
|
* Turning on and off
|
|
|
|
* Setting brightness, color temperature, and color (in HSV)
|
|
|
|
* Querying emeter information
|
|
|
|
* Transitions
|
2022-10-22 22:15:47 +00:00
|
|
|
* Presets
|
2020-12-09 09:13:14 +00:00
|
|
|
|
|
|
|
Currently unsupported
|
|
|
|
*********************
|
|
|
|
|
|
|
|
* Setting the default transitions
|
|
|
|
* Timers
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Feel free to open a pull request to add support for more features!
|
|
|
|
|
|
|
|
Transitions
|
|
|
|
***********
|
|
|
|
|
|
|
|
All commands changing the bulb state can be accompanied with a transition, e.g., to slowly fade the light off.
|
|
|
|
The transition time is in milliseconds, 0 means immediate change.
|
|
|
|
If no transition value is given, the default setting as configured for the bulb will be used.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Accepted values are command (and potentially bulb) specific, feel free to improve the documentation on accepted values.
|
|
|
|
|
|
|
|
**Example:** While KL130 allows at least up to 15 second transitions for smooth turning off transitions, turning it on will not be so smooth.
|
|
|
|
|
|
|
|
Command-line usage
|
|
|
|
******************
|
|
|
|
|
|
|
|
All command-line commands can be used with transition period for smooth changes.
|
|
|
|
|
|
|
|
|
|
|
|
**Example:** Turn the bulb off over a 15 second time period.
|
|
|
|
|
|
|
|
.. code::
|
|
|
|
|
2022-10-18 21:37:54 +00:00
|
|
|
$ kasa --type bulb --host <host> off --transition 15000
|
2020-12-09 09:13:14 +00:00
|
|
|
|
|
|
|
**Example:** Change the bulb to red with 20% brightness over 15 seconds:
|
|
|
|
|
|
|
|
.. code::
|
|
|
|
|
2022-10-18 21:37:54 +00:00
|
|
|
$ kasa --type bulb --host <host> hsv 0 100 20 --transition 15000
|
2020-12-09 09:13:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
API documentation
|
|
|
|
*****************
|
|
|
|
|
2020-06-30 00:29:52 +00:00
|
|
|
.. autoclass:: kasa.SmartBulb
|
|
|
|
:members:
|
2022-04-05 23:13:27 +00:00
|
|
|
:inherited-members:
|
2020-06-30 00:29:52 +00:00
|
|
|
:undoc-members:
|
2022-10-22 22:15:47 +00:00
|
|
|
|
|
|
|
.. autoclass:: kasa.SmartBulbPreset
|
|
|
|
:members:
|
|
|
|
:undoc-members:
|
2022-10-27 15:40:54 +00:00
|
|
|
|
2024-05-16 16:13:44 +00:00
|
|
|
.. autoclass:: kasa.iot.iotbulb.BehaviorMode
|
2023-02-18 20:17:19 +00:00
|
|
|
:members:
|
|
|
|
|
2024-05-16 16:13:44 +00:00
|
|
|
.. autoclass:: kasa.iot.iotbulb.TurnOnBehaviors
|
2023-02-18 20:17:19 +00:00
|
|
|
:members:
|
2022-10-27 15:40:54 +00:00
|
|
|
|
|
|
|
|
2024-05-16 16:13:44 +00:00
|
|
|
.. autoclass:: kasa.iot.iotbulb.TurnOnBehavior
|
2022-10-27 15:40:54 +00:00
|
|
|
:undoc-members:
|
2023-02-18 20:17:19 +00:00
|
|
|
:members:
|