Update smartcamera to support single get/set/do requests (#1187)

Not supported by H200 hub
This commit is contained in:
Steven B.
2024-10-24 13:11:28 +01:00
committed by GitHub
parent c839aaa1dd
commit 8ee8c17bdc
7 changed files with 505 additions and 123 deletions

View File

@@ -173,10 +173,16 @@ class FakeSmartCameraTransport(BaseTransport):
request_dict["params"]["childControl"]
)
if method == "set":
if method[:3] == "set":
for key, val in request_dict.items():
if key != "method":
module = key
# key is params for multi request and the actual params
# for single requests
if key == "params":
module = next(iter(val))
val = val[module]
else:
module = key
section = next(iter(val))
skey_val = val[section]
for skey, sval in skey_val.items():