mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-19 13:58:03 +00:00
Generalize smartdevice child support (#775)
* 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 Note, we do not currently perform queries on child modules so some data may not be available. At the moment, a stop-gap solution to use parent's data is used but this is not always correct; even if the device shares the same clock and cloud connectivity, it may have its own firmware updates.
This commit is contained in:
@@ -47,7 +47,6 @@ async def test_childdevice_properties(dev: SmartChildDevice):
|
||||
assert len(dev.children) > 0
|
||||
|
||||
first = dev.children[0]
|
||||
assert first.is_strip_socket
|
||||
|
||||
# children do not have children
|
||||
assert not first.children
|
||||
|
Reference in New Issue
Block a user