

def homeautoswitch(self, cmd, ain=None):
    '\n        Call a switch method.\n        Should only be used by internal library functions.\n        '
    assert self.sid, 'Not logged in'
    params = {
        'switchcmd': cmd,
        'sid': self.sid,
    }
    if ain:
        params['ain'] = ain
    url = (self.base_url + '/webservices/homeautoswitch.lua')
    response = self.session.get(url, params=params)
    response.raise_for_status()
    return response.text.strip()

dataset/ETHPy150Open DerMitch/fritzbox-smarthome/fritzhome/fritz.py FritzBox.homeautoswitch/original