class WemoPowerSwitch(PowerDevice): ''' Controls a wemo switch given an ipaddress. Run the following command to list devices: $ python ./devices/power.py ''' def __init__(self, outlet): addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml" self.switch = WemoSwitch(addr) def reset(self): self.switch.off() time.sleep(5) self.switch.on()
def __init__(self, outlet): addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml" self.switch = WemoSwitch(addr)
def __init__(self, outlet: str): """Instance initialization.""" addr = "http://" + outlet.replace("wemo://", "") + ":49153/setup.xml" super().__init__(None, outlet=addr) self.switch = WemoSwitch(self.outlet)
def __init__(self, outlet): """Instance initialization.""" addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml" self.switch = WemoSwitch(addr)