mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Add common childsetup interface (#1470)
Add a common interface for the `childsetup` module across `smart` and `smartcam` hubs. Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
@@ -44,8 +44,7 @@ async def hub_supported(dev: SmartDevice):
|
||||
"""List supported hub child device categories."""
|
||||
cs = dev.modules[Module.ChildSetup]
|
||||
|
||||
cats = [cat["category"] for cat in await cs.get_supported_device_categories()]
|
||||
for cat in cats:
|
||||
for cat in cs.supported_categories:
|
||||
echo(f"Supports: {cat}")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user