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

Create TuyaSmartPlug-example.py #163

Closed fajarmnrozaki closed 2 years ago

fajarmnrozaki commented 2 years ago

Proposing the example of python script file for monitoring the Tuya Smart Plug (1 Pack) that enables to sense a voltage, a current, a power of a connected device with its smart plug.

jasonacox commented 2 years ago

Thanks for the example script @fajarmnrozaki ! I have accepted the PR. I notice there is device ID and key information in the script. I assume these are bogus but will redact them just in case.

fajarmnrozaki commented 2 years ago

Thank you so much @jasonacox for merging the pull request in the main branch, and thanks for correcting the mistakes that I put my own ID in the example script of TuyaSmartPlug-example.py