shubhamdipt / tuyasmartapi

An api for handling Tuya Smart devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tuyasmartapi

An api for handling Tuya Smart devices.

Dependencies

Python3

pip install -r requirements.txt

Usage

Create a config.ini file with the following contents.

[TUYA]
username = <username>
password = <password>
location = EU
device = <device_id>

Installation

pip install tuyasmartapi

Example

>>>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())

About

An api for handling Tuya Smart devices.

License:MIT License


Languages

Language:Python 100.0%