An api for handling Tuya Smart devices.
Python3
pip install -r requirements.txt
Create a config.ini file with the following contents.
[TUYA]
username = <username>
password = <password>
location = EU
device = <device_id>
pip install tuyasmartapi
>>>from tuya.devices import TuyaSmartSwitch
>>>device = TuyaSmartSwitch(username=CONFIG["TUYA"]["username"], password=CONFIG["TUYA"]["password"], location=CONFIG["TUYA"]["location"], device=CONFIG["TUYA"]["device"])
>>>print(device.get_status())