def _set_status(self, mode, until=None):

        headers = dict(self.client.headers)
        headers['Content-Type'] = 'application/json'

        if until is None:
            data = {"SystemMode":mode,"TimeUntil":None,"Permanent":True}
        else:
            data = {"SystemMode":mode,"TimeUntil":"%sT00:00:00Z" % until.strftime('%Y-%m-%d'),"Permanent":False}
        r = requests.put('https://tccna.honeywell.com/WebAPI/emea/api/v1/temperatureControlSystem/%s/mode' % self.systemId, data=json.dumps(data), headers=headers)
dataset/ETHPy150Open watchforstock/evohome-client/evohomeclient2/controlsystem.py/ControlSystem._set_status/original