jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
999 stars 177 forks source link

Update README for new Cloud functions, and tighter deviceid error checking #220

Closed uzlonewolf closed 1 year ago

uzlonewolf commented 1 year ago

README update as requested in #219, and a bit tighter error checking for the deviceid arguments.

jasonacox commented 1 year ago

Thank you!

Off topic a bit, but you got me thinking about expanding Cloud functions, should we expose short-cut lookup functions as well? I'm thinking about getname(id) getkey(id) getmac(id) etc. (though things like product_name and icon could be helpful or useless). All of this can be derived from getdevices() payload today, but wondering if these functions could be useful.

uzlonewolf commented 1 year ago

I'm not feeling functions for stuff that's available from getdevices(), you just know someone is going to do something stupid and make a new request for every attribute for every device, and I'd rather not give Tuya a reason to restrict API access. If it's for something not available from getdevices() then sure, but with the sheer number of possible API calls I would only add them for things which would be rather useful (such as the device logs) or if we get a request for it.

uzlonewolf commented 1 year ago

Oh, and Happy Thanksgiving!

jasonacox commented 1 year ago

Thanks @uzlonewolf !! Happy Thanksgiving to you too! 🙏