def set(self, value):
    self._validate(value)
    converted_value = self._convert_to(value)
    response = self._call(self._set_url, dict(value=converted_value))
    if isinstance(response, int):
        self._fsapi.write_log(f'Trying to set, http-code: {response}')
        raise FSAPI_Session_Invalid_Exception()
    if (self._get_xml_single_content(response, 'status') == 'FS_OK'):
        self._last_value = value
        self._last_value_time = time.time()
        return True
    elif (self._get_xml_single_content(response, 'status') == 'FS_NODE_BLOCKED'):
        raise FSAPI_Node_Blocked_Exception()
    else:
        rslt = self._get_xml_single_content(response, 'status')
        if (rslt is None):
            raise Exception('Setting failed - Response: {}'.format(response))
        else:
            raise Exception('Setting failed - Status: {}'.format(rslt))
def set(self, value):
    self._validate(value)
    converted_value = self._convert_to(value)
    response = self._call(self._set_url, dict(value=converted_value))
    if isinstance(response, int):
        self._fsapi.write_log(f'Trying to set, http-code: {response}')
        raise FSAPI_Session_Invalid_Exception()
    if (self._get_xml_single_content(response, 'status') == 'FS_OK'):
        self._last_value = value
        self._last_value_time = time.time()
        return True
    elif (self._get_xml_single_content(response, 'status') == 'FS_NODE_BLOCKED'):
        raise FSAPI_Node_Blocked_Exception()
    else:
        rslt = self._get_xml_single_content(response, 'status')
        if (rslt is None):
            raise Exception('Setting failed - Response: {}'.format(response))
        else:
            raise Exception('Setting failed - Status: {}'.format(rslt))