From 4b0f515f191441d8183c2ede56cce5a9b2eb0062 Mon Sep 17 00:00:00 2001 From: Steven B <51370195+sdb9696@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:39:03 +0000 Subject: [PATCH] Fix smartcamera childdevice module --- kasa/experimental/modules/childdevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kasa/experimental/modules/childdevice.py b/kasa/experimental/modules/childdevice.py index 837793f1c..0168011dd 100644 --- a/kasa/experimental/modules/childdevice.py +++ b/kasa/experimental/modules/childdevice.py @@ -9,14 +9,16 @@ class ChildDevice(SmartCameraModule): NAME = "childdevice" QUERY_GETTER_NAME = "getChildDeviceList" - QUERY_MODULE_NAME = "childControl" + # This module is unusual in that QUERY_MODULE_NAME in the response is not + # the same one used in the request. + QUERY_MODULE_NAME = "child_device_list" def query(self) -> dict: """Query to execute during the update cycle. Default implementation uses the raw query getter w/o parameters. """ - return {self.QUERY_GETTER_NAME: {self.QUERY_MODULE_NAME: {"start_index": 0}}} + return {self.QUERY_GETTER_NAME: {"childControl": {"start_index": 0}}} async def _check_supported(self) -> bool: """Additional check to see if the module is supported by the device."""