code: def _restore_volume(self, fade):
          
          self.device.mute = self.mute
  
          # Can only change volume on device with fixed volume set to False
          # otherwise get uPnP error, so check first. Before issuing a network
          # command to check, fixed volume always has volume set to 100.
          # So only checked fixed volume if volume is 100.
          if self.volume == 100:
              fixed_vol = self.device.renderingControl.GetOutputFixed(
                  [('InstanceID', 0)])['CurrentFixed']
          else:
              fixed_vol = False
  
          # now set volume if not fixed
          if not fixed_vol:
              self.device.bass = self.bass
              self.device.treble = self.treble
              self.device.loudness = self.loudness
  
              if fade:
                  # if fade requested in restore
                  # set volume to 0 then fade up to saved volume (non blocking)
                  self.device.volume = 0
                  self.device.ramp_to_volume(self.volume)
              else:
                  # set volume
                  self.device.volume = self.volume
docs: Reinstate volume.
  
          Args:
              fade (bool): Whether volume should be faded up on restore.