Add childsetup module to smartcam hubs (#1469)

Add the `childsetup` module for `smartcam` hubs to allow pairing and unpairing child devices.
This commit is contained in:
Steven B.
2025-01-23 09:42:37 +00:00
committed by GitHub
parent bd43e0f7d2
commit 5e57f8bd6c
10 changed files with 278 additions and 39 deletions

View File

@@ -48,7 +48,10 @@ class ChildSetup(SmartModule):
detected = await self._get_detected_devices()
if not detected["child_device_list"]:
_LOGGER.info("No devices found.")
_LOGGER.warning(
"No devices found, make sure to activate pairing "
"mode on the devices to be added."
)
return []
_LOGGER.info(
@@ -63,7 +66,7 @@ class ChildSetup(SmartModule):
async def unpair(self, device_id: str) -> dict:
"""Remove device from the hub."""
_LOGGER.debug("Going to unpair %s from %s", device_id, self)
_LOGGER.info("Going to unpair %s from %s", device_id, self)
payload = {"child_device_list": [{"device_id": device_id}]}
return await self.call("remove_child_device_list", payload)