code: def status_charge():
      '''
      Return battery charge
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' apcups.status_charge
      '''
      data = status()
      if 'BCHARGE' in data:
          charge = data['BCHARGE'].split()
          if charge[1].lower() == 'percent':
              return float(charge[0])
  
      return {'Error': 'Load not available.'f status_charge():
      '''
      Return battery charge
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' apcups.status_charge
      '''
      data = status()
      if 'BCHARGE' in data:
          charge = data['BCHARGE'].split()
          if charge[1].lower() == 'percent':
              return float(charge[0])
  
      return {'Error': 'Load not available.'}
docs: Return battery charge
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' apcups.status_charge