10000 0.8.1 by sdb9696 · Pull Request #1345 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

0.8.1 #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 6, 2024
Merged

0.8.1 #1345

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [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](https://github.com/python-kasa/python-kasa/compare/0.8.0...0.8.1)

**Fixed bugs:**

- Fix update errors on hubs with unsupported children [\#1344](https://github.com/python-kasa/python-kasa/pull/1344) (@sdb9696)
- Fix smartcam missing device id [\#1343](https://github.com/python-kasa/python-kasa/pull/1343) (@sdb9696)

## [0.8.0](https://github.com/python-kasa/python-kasa/tree/0.8.0) (2024-11-26)

[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.7...0.8.0)
Expand Down
9 changes: 8 additions & 1 deletion kasa/smart/smartdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,14 @@
self._last_update, "get_child_device_list", {}
):
for info in child_info["child_device_list"]:
self._children[info["device_id"]]._update_internal_state(info)
child_id = info["device_id"]
if child_id not in self._children:
_LOGGER.debug(

Check warning on line 172 in kasa/smart/smartdevice.py

View check run for this annotation

Codecov / codecov/patch

kasa/smart/smartdevice.py#L172

Added line #L172 was not covered by tests
"Skipping child update for %s, probably unsupported device",
child_id,
)
continue

Check warning on line 176 in kasa/smart/smartdevice.py

View check run for this annotation

Codecov / codecov/patch

kasa/smart/smartdevice.py#L176

Added line #L176 was not covered by tests
self._children[child_id]._update_internal_state(info)

def _update_internal_info(self, info_resp: dict) -> None:
"""Update the internal device info."""
Expand Down
10 changes: 9 additions & 1 deletion kasa/smartcam/smartcamdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@
self._last_update, "getChildDeviceList", {}
):
for info in child_info["child_device_list"]:
self._children[info["device_id"]]._update_internal_state(info)
child_id = info["device_id"]
if child_id not in self._children:
_LOGGER.debug(

Check warning on line 73 in kasa/smartcam/smartcamdevice.py

View check run for this annotation

Codecov / codecov/patch

kasa/smartcam/smartcamdevice.py#L73

Added line #L73 was not covered by tests
"Skipping child update for %s, probably unsupported device",
child_id,
)
continue

Check warning on line 77 in kasa/smartcam/smartcamdevice.py

View check run for this annotation

Codecov / codecov/patch

kasa/smartcam/smartcamdevice.py#L77

Added line #L77 was not covered by tests
self._children[child_id]._update_internal_state(info)

async def _initialize_smart_child(
self, info: dict, child_components: dict
Expand Down Expand Up @@ -200,6 +207,7 @@
"mac": basic_info["mac"],
"hwId": basic_info.get("hw_id"),
"oem_id": basic_info["oem_id"],
"device_id": basic_info["dev_id"],
}

@property
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "python-kasa"
version = "0. 8000 8.0"
version = "0.8.1"
description = "Python API for TP-Link Kasa and Tapo devices"
license = {text = "GPL-3.0-or-later"}
authors = [ { name = "python-kasa developers" }]
Expand Down
5 changes: 5 additions & 0 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ def _get_subclasses(of_class):
)


async def test_device_id(dev: Device):
"""Test all devices have a device id."""
assert dev.device_id


async def test_alias(dev):
test_alias = "TEST1234"
original = dev.alias
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0