% symbol in curl for command_line switch

I’m trying to use the command_line switch executing a curl command with a % symbol in it, but my logs keep throwing this error:

while scanning for the next token found character '%' that cannot start any token in "/config/switches.yaml", line 6, column 237

the line in question contains this and the % is near the end of the line:

command_state: "/usr/bin/curl --silent -X GET http://username:[email protected]/status | grep -oE 'id=.?state[^<>]*>[^<>]+' | cut -d'>' -f2 | tr [:lower:] [:upper:] | xargs -I{} echo 'obase=2; ibase=16; {}' | bc | awk '{printf "%08i\n",$0}' | cut -c2"

How can I make this work? I absolutely need this % symbol in the command for it to work…

EDIT: NEVERMIND!
All I had to do was remove the double quote " from the head and tail of the command. Here is what it looks like after I made that modification:

 command_state: /usr/bin/curl --silent -X GET http://username:[email protected]/status | grep -oE 'id=.?state[^<>]*>[^<>]+' | cut -d'>' -f2 | tr [:lower:] [:upper:] | xargs -I{} echo 'obase=2; ibase=16; {}' | bc | awk '{printf "%08i\n",$0}' | cut -c2