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:
@@ -71,8 +71,8 @@ class SmartBulb(SmartDevice):
|
||||
|
||||
LIGHT_SERVICE = "smartlife.iot.smartbulb.lightingservice"
|
||||
|
||||
def __init__(self, host: str, *, child_id: str = None, cache_ttl: int = 3) -> None:
|
||||
SmartDevice.__init__(self, host=host, child_id=child_id, cache_ttl=cache_ttl)
|
||||
def __init__(self, host: str, *, cache_ttl: int = 3) -> None:
|
||||
SmartDevice.__init__(self, host=host, cache_ttl=cache_ttl)
|
||||
self.emeter_type = "smartlife.iot.common.emeter"
|
||||
self._device_type = DeviceType.Bulb
|
||||
self._light_state = None
|
||||
|
Reference in New Issue
Block a user