Set the speaker's mode.
488007
def play_mode(self, playmode):
        """"""
        playmode = playmode.upper()
        if playmode not in PLAY_MODES.keys():
            raise KeyError("'%s' is not a valid play mode" % playmode)

        self.avTransport.SetPlayMode([
            ('InstanceID', 0),
            ('NewPlayMode', playmode)
        ])
745465
public void setSystemPropertiesMode(String pMode) {
        systemPropertyMode = SystemPropertyMode.fromMode(pMode);
        if (systemPropertyMode == null) {
            systemPropertyMode = SystemPropertyMode.MODE_NEVER;
        }
    }
816978
def do_mode(self, args):
        ''''''
        if args.mode:
            mode = { 'idle': self.task_master.IDLE,
                     'run': self.task_master.RUN,
                     'terminate': self.task_master.TERMINATE }[args.mode]
            self.task_master.set_mode(mode)
            self.stdout.write('set mode to {0!r}\n'.format(args.mode))
        else:
            mode = self.task_master.get_mode()
            self.stdout.write('{0!s}\n'.format(mode))
509374
def set(self, mode):
        
        if mode == ThermostatMode.FAN_AUTO:
            new_mode = COMMAND_THERMOSTAT_CONTROL_OFF_FAN_0X6B_0X08
        elif mode == ThermostatMode.FAN_ALWAYS_ON:
            new_mode = COMMAND_THERMOSTAT_CONTROL_ON_FAN_0X6B_0X07
        if new_mode:
            msg = ExtendedSend(address=self._address,
                               commandtuple=new_mode,
                               userdata=Userdata())
            msg.set_checksum()
            self._send_method(msg, self._mode_change_ack)
3126
def set_transmit_mode(self, mode):
        

        self.api.call_rc('port setTransmitMode {} {}'.format(mode, self.uri))
1187333
public void setMode(int mode) {
        model.setMode(mode);
        asCategoryButton.setSelected(PropertySheet.VIEW_AS_CATEGORIES == mode);
    }
1119161
async def set_sound_settings(self, target: str, value: str):
        """"""
        params = {"settings": [{"target": target, "value": value}]}
        return await self.services["audio"]["setSoundSettings"](params)
1359160
public void setAmbient(float gray){
        ambient[0]=gray;
        ambient[1]=gray;
        ambient[2]=gray;
        Am = true;
    }
515266
def setCurrentMode(self, mode):
        
        if type(mode) == int:
            mode = self.LoggingMap.get(mode, ('standard', ''))[0]
            
        if mode == self._currentMode:
            return
            
        self._currentMode = mode
        color = self.color(mode)
        if not color.isValid():
            return
            
        format = QtGui.QTextCharFormat()
        format.setForeground(color)
        self.setCurrentCharFormat(format)
869459
def set_listener(self, name, listener):
        
        with self.__listeners_change_condition:
            self.listeners[name] = listener
696640
public synchronized void setMode(IndexerIoMode mode)
   {
      if (this.mode != mode)
      {
         log.info("Indexer io mode=" + mode);
         this.mode = mode;
         for (IndexerIoModeListener listener : listeners)
         {
            listener.onChangeMode(mode);
         }
      }
   }
126113
def set_volume(self, volume):
        """"""
        if volume > 100 or volume < 0:
            raise Exception('Bad request to volume control. '
                            'Must be between 0 and 100')
        params = ('<InstanceID>0</InstanceID><Channel>Master</Channel>'
                  '<DesiredVolume>{}</DesiredVolume>').format(volume)
        self.soap_request(URL_CONTROL_DMR, URN_RENDERING_CONTROL,
                          'SetVolume', params)
616520
private void setupModeOptions() {

        int versionsDeleted = OpenCms.getSystemInfo().getHistoryVersionsAfterDeletion();

        String mode;

        if (versionsDeleted == 0) {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        } else if (versionsDeleted == 1) {
            mode = CmsFileHistoryApp.MODE_WITHOUTVERSIONS;
        } else if ((versionsDeleted > 1) || (versionsDeleted == -1)) {
            mode = CmsFileHistoryApp.MODE_WITHVERSIONS;
        } else {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        }
        m_mode.setValue(mode);
    }
1029034
def sound_speed_mode(self, mode):
        """"""
        if mode == "measured":
            mode = 0
        if mode == "fixed":
            mode = 1
        self.pdx.SoundSpeedMode = mode
770845
def set_muted(self, status):
        """"""
        self._group['muted'] = status
        yield from self._server.group_mute(self.identifier, status)
        _LOGGER.info('set muted to %s on %s', status, self.friendly_name)
384774
def setCurrentMode( self, mode ):
        
        if ( self._currentMode == mode ):
            return
        
        self._currentMode = mode
        self.updateModeSettings()
66872
public void setMode(ArrayList<Long> tokens, String mode){
        JSONObject jobj = new JSONObject();
        try {
            // int a[] = {256265, 408065, 779521, 738561, 177665, 25601};
            JSONArray list = new JSONArray();
            JSONArray listMain = new JSONArray();
            listMain.put(0, mode);
            for(int i=0; i< tokens.size(); i++){
                list.put(i, tokens.get(i));
            }
            listMain.put(1, list);
            jobj.put("a", mSetMode);
            jobj.put("v", listMain);
            for(int i = 0; i < tokens.size(); i++){
                modeMap.put(tokens.get(i), mode);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        if(ws != null) {
            ws.sendText(jobj.toString());
        }
    }