mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
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](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)
This commit is contained in:
commit
611cd66266
11
CHANGELOG.md
11
CHANGELOG.md
@ -1,5 +1,16 @@
|
|||||||
# Changelog
|
# 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)
|
## [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)
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.7...0.8.0)
|
||||||
|
@ -167,7 +167,14 @@ class SmartDevice(Device):
|
|||||||
self._last_update, "get_child_device_list", {}
|
self._last_update, "get_child_device_list", {}
|
||||||
):
|
):
|
||||||
for info in child_info["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(
|
||||||
|
"Skipping child update for %s, probably unsupported device",
|
||||||
|
child_id,
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
self._children[child_id]._update_internal_state(info)
|
||||||
|
|
||||||
def _update_internal_info(self, info_resp: dict) -> None:
|
def _update_internal_info(self, info_resp: dict) -> None:
|
||||||
"""Update the internal device info."""
|
"""Update the internal device info."""
|
||||||
|
@ -68,7 +68,14 @@ class SmartCamDevice(SmartDevice):
|
|||||||
self._last_update, "getChildDeviceList", {}
|
self._last_update, "getChildDeviceList", {}
|
||||||
):
|
):
|
||||||
for info in child_info["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(
|
||||||
|
"Skipping child update for %s, probably unsupported device",
|
||||||
|
child_id,
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
self._children[child_id]._update_internal_state(info)
|
||||||
|
|
||||||
async def _initialize_smart_child(
|
async def _initialize_smart_child(
|
||||||
self, info: dict, child_components: dict
|
self, info: dict, child_components: dict
|
||||||
@ -200,6 +207,7 @@ class SmartCamDevice(SmartDevice):
|
|||||||
"mac": basic_info["mac"],
|
"mac": basic_info["mac"],
|
||||||
"hwId": basic_info.get("hw_id"),
|
"hwId": basic_info.get("hw_id"),
|
||||||
"oem_id": basic_info["oem_id"],
|
"oem_id": basic_info["oem_id"],
|
||||||
|
"device_id": basic_info["dev_id"],
|
||||||
}
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "python-kasa"
|
name = "python-kasa"
|
||||||
version = "0.8.0"
|
version = "0.8.1"
|
||||||
description = "Python API for TP-Link Kasa and Tapo devices"
|
description = "Python API for TP-Link Kasa and Tapo devices"
|
||||||
license = {text = "GPL-3.0-or-later"}
|
license = {text = "GPL-3.0-or-later"}
|
||||||
authors = [ { name = "python-kasa developers" }]
|
authors = [ { name = "python-kasa developers" }]
|
||||||
|
@ -55,6 +55,11 @@ device_classes = pytest.mark.parametrize(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def test_device_id(dev: Device):
|
||||||
|
"""Test all devices have a device id."""
|
||||||
|
assert dev.device_id
|
||||||
|
|
||||||
|
|
||||||
async def test_alias(dev):
|
async def test_alias(dev):
|
||||||
test_alias = "TEST1234"
|
test_alias = "TEST1234"
|
||||||
original = dev.alias
|
original = dev.alias
|
||||||
|
Loading…
Reference in New Issue
Block a user