Changes the thermostat state to the one passed as an argument as name

        :param name: The name of the thermostat state to change to.
437127
def thermostat_state(self, name):
        
        self._validate_thermostat_state_name(name)
        id_ = next((key for key in STATES.keys()
                    if STATES[key].lower() == name.lower()), None)
        data = copy.copy(self._parameters)
        data.update({'state': 2,
                     'temperatureState': id_})
        response = self._get_data('/client/auth/schemeState', data)
        self._logger.debug('Response received {}'.format(response))
        self._clear_cache()
987603
def transition(name, states = self::STATES, transitions = self::TRANSITIONS)
      self.state_machines ||= {}
      self.state_machines[name] = { states: states.values, transitions: transitions }
      self.state_machines[name][:states].each do |this_state|
        method_name = "#{this_state}?".to_sym
        raise 'Method already defined' if self.instance_methods(false).include?(method_name)
        define_method method_name do
          current_state_based_on(this_state) == this_state
        end
      end
    end
1065462
def set(self, name: str, value: Any) -> None:
        
        self.agent.set(name, value)
1044717
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 200:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `200`")

        self._name = name
411448
def name(self, name):
        
        from_name = self.name
        assert isinstance(name, str)
        self._name = name
        if self.has_parent():
            self._parent_._name_changed(self, from_name)
968548
def rename_next_state_fluent(name: str) -> str:
    '''
    '''
    i = name.index('/')
    functor = name[:i-1]
    arity = name[i+1:]
    return "{}/{}".format(functor, arity)
289684
def _set_name(self, version=AUTO):
        """"""

        name = 'python'

        if version:
            if version is AUTO:
                version = sys.version_info[0]

                if version == 2:
                    version = ''

            name = '%s%s' % (name, version)

        self.name = name
1049893
def set_active_state(self, name, value):
        """"""
        if name not in self.__active_states.keys():
            raise ValueError("Can not set unknown state '" + name + "'")

        if (isinstance(self.__active_states[name], int) and
                isinstance(value, str)):
            # we get an update as str but current value is
            # an int, try to convert
            self.__active_states[name] = int(value)
        elif (isinstance(self.__active_states[name], float) and
              isinstance(value, str)):
            # we get an update as str but current value is
            # a float, try to convert
            self.__active_states[name] = float(value)
        else:
            self.__active_states[name] = value
516959
def set_name(self, new_name):
        

        # change the hostname in the startup-config
        if os.path.isfile(self.startup_config_path):
            try:
                with open(self.startup_config_path, "r+", encoding="utf-8", errors="replace") as f:
                    old_config = f.read()
                    new_config = re.sub(r"^hostname .+$", "hostname " + new_name, old_config, flags=re.MULTILINE)
                    f.seek(0)
                    f.write(new_config)
            except OSError as e:
                raise DynamipsError("Could not amend the configuration {}: {}".format(self.startup_config_path, e))

        # change the hostname in the private-config
        if os.path.isfile(self.private_config_path):
            try:
                with open(self.private_config_path, "r+", encoding="utf-8", errors="replace") as f:
                    old_config = f.read()
                    new_config = old_config.replace(self.name, new_name)
                    f.seek(0)
                    f.write(new_config)
            except OSError as e:
                raise DynamipsError("Could not amend the configuration {}: {}".format(self.private_config_path, e))

        yield from self._hypervisor.send('vm rename "{name}" "{new_name}"'.format(name=self._name, new_name=new_name))
        log.info('Router "{name}" [{id}]: renamed to "{new_name}"'.format(name=self._name, id=self._id, new_name=new_name))
        self._name = new_name
845412
def rename(self, new_name):
        
        payload = {
            'new_name': new_name
        }
        data = json.dumps(payload)
        req = self.request(self.mist_client.uri+'/keys/'+self.id, data=data)
        req.put()
        self.id = new_name
        self.mist_client.update_keys()
651273
public void setName(String name) throws IOException {
    if (failException != null) {
      throw failException;
    }

    if (name == null || name.length() == 0) {
      return;
    }

    sessionInfo.name = name;

    SessionInfo newInfo = new SessionInfo(sessionInfo);
    cmNotifier.addCall(
      new ClusterManagerService.sessionUpdateInfo_args(sessionId, newInfo));
  }
884565
def state(self, state):
        ''''''
        logger.debug('client changing to state=%s', ClientState.Names[state])
        self._state = state
88280
def set(self, name, arg=UNSET):
        
        self._set(name, arg, self._lineno)
305244
def change_state(self, state):
        """"""
        if state is not self.state:
            if self.debug:
                self.print_debug(b'state => ' + STATE_NAMES[state].encode())
            if self.state is STATE_NOT_STARTED:
                self.read_in_state_not_started = b''
            self.state = state
815439
def register_config(self, cls, name):
        
        self._configs.add(cls)
        self._config_names.add(name)
636298
public void setName(final String name) {
		this.name = name;
		setHumanName(JKMessage.get(name, true));
	}
1344062
def set_name(self, name):
        """"""
        if not name:
            name = ''
        self._client['config']['name'] = name
        yield from self._server.client_name(self.identifier, name)