homebridge-kasa-python 3.0.0-beta.6 → 3.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/python/kasaApi.py +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
</span>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
|
-
<a href="https://github.com/ZeliardM/homebridge-kasa-python/blob/latest/LICENSE"><img src="https://
|
|
15
|
-
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/latest"><img src="https://
|
|
16
|
-
<a href="https://pypi.org/project/python-kasa/"><img src="https://
|
|
17
|
-
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/beta"><img src="https://
|
|
18
|
-
<a href="https://pypi.org/project/python-kasa/"><img src="https://
|
|
19
|
-
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/latest"><img src="https://
|
|
20
|
-
<a href="https://www.paypal.me/ZeliardM/USD/"><img src="https://
|
|
21
|
-
<a href="https://github.com/sponsors/ZeliardM"><img src="https://
|
|
22
|
-
<a href="https://github.com/homebridge/homebridge/wiki/Verified-Plugins"><img src="https://
|
|
14
|
+
<a href="https://github.com/ZeliardM/homebridge-kasa-python/blob/latest/LICENSE"><img src="https://img.shields.io/npm/l/homebridge-kasa-python?color=yellow" alt="mit license"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/latest"><img src="https://img.shields.io/npm/v/homebridge-kasa-python/latest?label=npm%40latest&color=blue" alt="latest npm version"></a>
|
|
16
|
+
<a href="https://pypi.org/project/python-kasa/"><img src="https://img.shields.io/badge/Python%40latest-3.11%2C%203.12%2C%203.13-blue" alt="latest PyPI pyversions"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/beta"><img src="https://img.shields.io/npm/v/homebridge-kasa-python/beta?label=npm%40beta&color=red" alt="beta npm version"></a>
|
|
18
|
+
<a href="https://pypi.org/project/python-kasa/"><img src="https://img.shields.io/badge/Python%40latest-3.11%2C%203.12%2C%203.13-red" alt="beta PyPI pyversions"></a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/homebridge-kasa-python/v/latest"><img src="https://img.shields.io/npm/dt/homebridge-kasa-python?color=brightgreen" alt="npm downloads total"></a>
|
|
20
|
+
<a href="https://www.paypal.me/ZeliardM/USD/"><img src="https://img.shields.io/badge/donate-paypal-orange" alt="donate paypal"></a>
|
|
21
|
+
<a href="https://github.com/sponsors/ZeliardM"><img src="https://img.shields.io/badge/donate-github-orange" alt="donate github"></a>
|
|
22
|
+
<a href="https://github.com/homebridge/homebridge/wiki/Verified-Plugins"><img src="https://img.shields.io/badge/homebridge-verified-blueviolet" alt="homebridge verified"></a>
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
<div align="center">
|
package/dist/python/kasaApi.py
CHANGED
|
@@ -347,7 +347,11 @@ async def perform_device_action(
|
|
|
347
347
|
child_num: Optional[int] = None,
|
|
348
348
|
) -> dict[str, Any]:
|
|
349
349
|
try:
|
|
350
|
-
|
|
350
|
+
if child_num is not None and device.children:
|
|
351
|
+
sorted_children = sorted(device.children, key=lambda c: _extract_child_suffix_index(c.device_id))
|
|
352
|
+
target = sorted_children[child_num]
|
|
353
|
+
else:
|
|
354
|
+
target = device
|
|
351
355
|
log(f"Performing action={action} on feature={feature}", alias=target.alias)
|
|
352
356
|
light = target.modules.get(Module.Light)
|
|
353
357
|
fan = target.modules.get(Module.Fan)
|
package/package.json
CHANGED