mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-13 10:58:02 +00:00
Move child socket handling to its own SmartStripPlug class (#26)
* All child device handling is moved out from the main smartdevice class, which simplifies the code. * This will also cleanup the constructors as only the subdevices require the ID and the parent reference. * SmartStripPlug offers SmartPlug like interface, but does not allow separate updates * Trying to update() on the children will cause a warning.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
from pprint import pformat as pf
|
||||
import re
|
||||
|
||||
import click
|
||||
|
||||
@@ -112,7 +112,7 @@ def dump_discover(ctx, scrub):
|
||||
if key in ["latitude_i", "longitude_i"]:
|
||||
val = 0
|
||||
else:
|
||||
val = re.sub("\w", "0", val)
|
||||
val = re.sub(r"\w", "0", val)
|
||||
dev["system"]["get_sysinfo"][key] = val
|
||||
|
||||
model = dev["system"]["get_sysinfo"]["model"]
|
||||
|
Reference in New Issue
Block a user