mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
simplify loop in __init__ in smartstrip.py
This commit is contained in:
parent
b2ca20edf0
commit
8c25590186
@ -55,12 +55,12 @@ class SmartStrip(SmartPlug):
|
||||
self.plugs: List[SmartPlug] = []
|
||||
children = self.sync.get_sys_info()["children"]
|
||||
self.num_children = len(children)
|
||||
for plug in range(self.num_children):
|
||||
for child in children:
|
||||
self.plugs.append(
|
||||
SmartPlug(
|
||||
host,
|
||||
protocol,
|
||||
context=children[plug]["id"],
|
||||
context=child["id"],
|
||||
cache_ttl=cache_ttl,
|
||||
ioloop=ioloop,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user