8000 Fix smartcam missing device id (#1343) · python-kasa/python-kasa@1c9ee4d · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c9ee4d

Browse files
authored
Fix smartcam missing device id (#1343)
1 parent 8814d94 commit 1c9ee4d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

kasa/smartcam/smartcamdevice.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def _map_info(self, device_info: dict) -> dict:
200200
"mac": basic_info["mac"],
201201
"hwId": basic_info.get("hw_id"),
202202
"oem_id": basic_info["oem_id"],
203+
"device_id": basic_info["dev_id"],
203204
}
204205

205206
@property

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

0 commit comments

Comments
 (0)
0