def set_volume(self, percent, update_group=True):
        """Set client volume percent."""
        if percent not in range(0, 101):
            raise ValueError('Volume percent out of range')
        new_volume = self._client['config']['volume']
        new_volume['percent'] = percent
        self._client['config']['volume']['percent'] = percent
        yield from self._server.client_volume(self.identifier, new_volume)
        if update_group:
            self._server.group(self.group.identifier).callback()
        _LOGGER.info('set volume to %s on %s', percent, self.friendly_name)
def set_volume ( self , percent , update_group = True ) : if percent not in range ( 0 , 101 ) : raise ValueError ( 'Volume percent out of range' ) new_volume = self . _client [ 'config' ] [ 'volume' ] new_volume [ 'percent' ] = percent self . _client [ 'config' ] [ 'volume' ] [ 'percent' ] = percent yield from self . _server . client_volume ( self . identifier , new_volume ) if update_group : self . _server . group ( self . group . identifier ) . callback ( ) _LOGGER . info ( 'set volume to %s on %s' , percent , self . friendly_name )
Set client volume percent.