mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 18:38:03 +00:00
Add smartcam child device support for smartcam hubs (#1413)
This commit is contained in:
@@ -335,7 +335,7 @@ device_smartcam = parametrize("devices smartcam", protocol_filter={"SMARTCAM"})
|
||||
camera_smartcam = parametrize(
|
||||
"camera smartcam",
|
||||
device_type_filter=[DeviceType.Camera],
|
||||
protocol_filter={"SMARTCAM"},
|
||||
protocol_filter={"SMARTCAM", "SMARTCAM.CHILD"},
|
||||
)
|
||||
hub_smartcam = parametrize(
|
||||
"hub smartcam",
|
||||
@@ -377,7 +377,7 @@ check_categories()
|
||||
def device_for_fixture_name(model, protocol):
|
||||
if protocol in {"SMART", "SMART.CHILD"}:
|
||||
return SmartDevice
|
||||
elif protocol == "SMARTCAM":
|
||||
elif protocol in {"SMARTCAM", "SMARTCAM.CHILD"}:
|
||||
return SmartCamDevice
|
||||
else:
|
||||
for d in STRIPS_IOT:
|
||||
@@ -434,7 +434,7 @@ async def get_device_for_fixture(
|
||||
d.protocol = FakeSmartProtocol(
|
||||
fixture_data.data, fixture_data.name, verbatim=verbatim
|
||||
)
|
||||
elif fixture_data.protocol == "SMARTCAM":
|
||||
elif fixture_data.protocol in {"SMARTCAM", "SMARTCAM.CHILD"}:
|
||||
d.protocol = FakeSmartCamProtocol(
|
||||
fixture_data.data, fixture_data.name, verbatim=verbatim
|
||||
)
|
||||
|
Reference in New Issue
Block a user