8000 0.8.1 (#1345) · python-kasa/python-kasa@611cd66 · GitHub
[go: up one dir, main page]

Skip to content

Commit 611cd66

Browse files
authored
0.8.1 (#1345)
## [0.8.1](https://github.com/python-kasa/python-kasa/tree/0.8.1) (2024-12-06) This patch release fixes some issues with newly supported smartcam devices. [Full Changelog](0.8.0...0.8.1) **Fixed bugs:** - Fix update errors on hubs with unsupported children [\#1344](#1344) (@sdb9696) - Fix smartcam missing device id [\#1343](#1343) (@sdb9696)
2 parents 6adb2b5 + 5a596db commit 611cd66

File tree

6 files changed

+35
-4
lines changed

6 files changed

+35
-4
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [0.8.1](https://github.com/python-kasa/python-kasa/tree/0.8.1) (2024-12-06)
4+
5+
This patch release fixes some issues with newly supported smartcam devices.
6+
7+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.8.0...0.8.1)
8+
9+
**Fixed bugs:**
10+
11+
- Fix update errors on hubs with unsupported children [\#1344](https://github.com/python-kasa/python-kasa/pull/1344) (@sdb9696)
12+
- Fix smartcam missing device id [\#1343](https://github.com/python-kasa/python-kasa/pull/1343) (@sdb9696)
13+
314
## [0.8.0](https://github.com/python-kasa/python-kasa/tree/0.8.0) (2024-11-26)
415

516
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.7...0.8.0)

kasa/smart/smartdevice.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ def _update_children_info(self) -> None:
167167
self._last_update, "get_child_device_list", {}
168168
):
169169
for info in child_info["child_device_list"]:
170-
self._children[info["device_id"]]._update_internal_state(info)
170+
child_id = info["device_id"]
171+
if child_id not in self._children:
172+
_LOGGER.debug(
173+
"Skipping child update for %s, probably unsupported device",
174+
child_id,
175+
)
176+
continue
177+
self._children[child_id]._update_internal_state(info)
171178

172179
def _update_internal_info(self, info_resp: dict) -> None:
173180
"""Update the internal device info."""

kasa/smartcam/smartcamdevice.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ def _update_children_info(self) -> None:
6868
self._last_update, "getChildDeviceList", {}
6969
):
7070
for info in child_info["child_device_list"]:
71-
self._children[info["device_id"]]._update_internal_state(info)
71+
child_id = info["device_id"]
72+
if child_id not in self._children:
73+
_LOGGER.debug(
74+
"Skipping child update for %s, probably unsupported device",
75+
child_id,
76+
)
77+
continue
78+
self._children[child_id]._update_internal_state(info)
7279

7380
async def _initialize_smart_child(
7481
self, info: dict, child_components: dict
@@ -200,6 +207,7 @@ def _map_info(self, device_info: dict) -> dict:
200207
"mac": basic_info["mac"],
201208
"hwId": basic_info.get("hw_id"),
202209
"oem_id": basic_info["oem_id"],
210+
"device_id": basic_info["dev_id"],
203211
}
204212

205213
@property

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-kasa"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
description = "Python API for TP-Link Kasa and Tapo devices"
55
license = {text = "GPL-3.0-or-later"}
66
authors = [ { name = "python-kasa developers" }]

tests/test_device.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ def _get_subclasses(of_class):
5555
)
5656

5757

58+
async def test_device_id(dev: Device):
59+
"""Test all devices have a device id."""
60+
assert dev.device_id
61+
62+
5863
async def test_alias(dev):
5964
test_alias = "TEST1234"
6065
original = dev.alias

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0