def 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.'}

def 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.' }
return battery charge cli example: .