Skip to content

Fix smartcam missing device id #1343

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 2 commits into from
Dec 6, 2024
Merged
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
1 change: 1 addition & 0 deletions kasa/smartcam/smartcamdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def _map_info(self, device_info: dict) -> dict:
"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
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
Loading