def set_sound_mode(self, sound_mode):
        """
        Set sound_mode of device.

        Valid values depend on the device and should be taken from
        "sound_mode_list".
        Return "True" on success and "False" on fail.
        """
        if sound_mode == ALL_ZONE_STEREO:
            if self._set_all_zone_stereo(True):
                self._sound_mode_raw = ALL_ZONE_STEREO
                return True
            else:
                return False
        if self._sound_mode_raw == ALL_ZONE_STEREO:
            if not self._set_all_zone_stereo(False):
                return False
        # For selection of sound mode other names then at receiving sound modes
        # have to be used
        # Therefore source mapping is needed to get sound_mode
        # Create command URL and send command via HTTP GET
        command_url = self._urls.command_sel_sound_mode + sound_mode
        # sent command
        try:
            if self.send_get_command(command_url):
                self._sound_mode_raw = self._sound_mode_dict[sound_mode][0]
                return True
            else:
                return False
        except requests.exceptions.RequestException:
            _LOGGER.error("Connection error: sound mode function %s not set.",
                          sound_mode)
            return False
def set_sound_mode ( self , sound_mode ) : if sound_mode == ALL_ZONE_STEREO : if self . _set_all_zone_stereo ( True ) : self . _sound_mode_raw = ALL_ZONE_STEREO return True else : return False if self . _sound_mode_raw == ALL_ZONE_STEREO : if not self . _set_all_zone_stereo ( False ) : return False command_url = self . _urls . command_sel_sound_mode + sound_mode try : if self . send_get_command ( command_url ) : self . _sound_mode_raw = self . _sound_mode_dict [ sound_mode ] [ 0 ] return True else : return False except requests . exceptions . RequestException : _LOGGER . error ( "Connection error: sound mode function %s not set." , sound_mode ) return False
Set sound_mode of device.

        Valid values depend on the device and should be taken from
        "sound_mode_list".
        Return "True" on success and "False" on fail.