Open adrianmak opened 1 year ago
Hi @adrianmak ! This module is for reading power only. However, it uses and is based on tinytuya which does allow you to change state:
import tinytuya
# Connect to Device
d = tinytuya.OutletDevice(
dev_id='DEVICE_ID_HERE',
address='IP_ADDRESS_HERE',
local_key='LOCAL_KEY_HERE',
version=3.3)
# Get Status
data = d.status()
print('set_status() result %r' % data)
# Turn On
d.turn_on()
# Turn Off
d.turn_off()
Can I use this module to change a smart plug power state ?