Skip to content
Merged
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
6 changes: 4 additions & 2 deletions kasa/experimental/modules/childdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down