Hello , I am also having that issue as well . I was seeing this problem in between USB and LAN . Although i have not done anything to firmware , but i modified my code , so that when i am on USB , it will come direct value and when i am on LAN , it will come string , so i will strip the string and use the value .
For this i used :- (here query command).strip(" ")[1]
If you are ok with this approach you can go ahead , otherwise if you found any other method , please comment here , i will also learn .
Thank you , have a nice day man.