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

        :param name: The name of the thermostat state to change to.

def thermostat_state(self, name):
        """Changes the thermostat state to the one passed as an argument as name

        :param name: The name of the thermostat state to change to.
        """
        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()