From 1c9ee4d53729f66b3d560de4d7eb9ceacd7d503e Mon Sep 17 00:00:00 2001 From: "Steven B." <51370195+sdb9696@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:40:44 +0000 Subject: [PATCH] Fix smartcam missing device id (#1343) --- kasa/smartcam/smartcamdevice.py | 1 + tests/test_device.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/kasa/smartcam/smartcamdevice.py b/kasa/smartcam/smartcamdevice.py index 0e49be26..d75c378b 100644 --- a/kasa/smartcam/smartcamdevice.py +++ b/kasa/smartcam/smartcamdevice.py @@ -200,6 +200,7 @@ class SmartCamDevice(SmartDevice): "mac": basic_info["mac"], "hwId": basic_info.get("hw_id"), "oem_id": basic_info["oem_id"], + "device_id": basic_info["dev_id"], } @property diff --git a/tests/test_device.py b/tests/test_device.py index 1d780c32..5cf75a61 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -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): test_alias = "TEST1234" original = dev.alias