mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Generalize smartdevice child support
* Initialize children's modules (and features) using the child component negotiation results * Set device_type based on the device response * Print out child features in cli 'state' * Add --child option to cli 'command' to allow targeting child devices * Guard "generic" features like rssi, ssid, etc. only to devices which have this information
This commit is contained in:
@@ -255,7 +255,9 @@ async def test_device_class_ctors(device_class_name_obj):
|
||||
klass = device_class_name_obj[1]
|
||||
if issubclass(klass, SmartChildDevice):
|
||||
parent = SmartDevice(host, config=config)
|
||||
dev = klass(parent, 1)
|
||||
dev = klass(
|
||||
parent, {"dummy": "info", "device_id": "dummy"}, {"dummy": "components"}
|
||||
)
|
||||
else:
|
||||
dev = klass(host, config=config)
|
||||
assert dev.host == host
|
||||
|
Reference in New Issue
Block a user