TuyaAPI / cli

🔧 A CLI for Tuya devices
MIT License
261 stars 44 forks source link

"tuya-cli get" produces a json string that does not conform to standard #153

Open timo12357 opened 1 year ago

timo12357 commented 1 year ago

When using tuya-cli to read status of zigbee sensors behind a gateway like this:

tuya-cli get --ip 192.168.0.114 --id bf82mostofitremoved --key 322fmostofitremoved --cid a4c1mostofitremoved --protocol-version 3.3

it produces an output like this:

{ '1': 173, '2': 249, '4': 100 }

JSON does only allow double quotes. And so does the JSONPath Online Evaluation.

https://www.json.org/json-en.html#:~:text=wrapped%20in%20double%20quotes

It seems like the tuya-cli output would benefit from using double quotes, too?

codetheweb commented 1 year ago

Yes, happy to accept a PR to fix this.