tinytuya
tinytuya copied to clipboard
Include dps Comment in Snapshot.py Example
Hello,
I spent several hours trying to turn my EarthBulb smart LED off with TinyTuya. I eventually got it and figured out that I had to change d.set_status(False) to d.set_status(False, 20) in my case.
Can we include a comment in this example regarding potentially needing to change the dps index to match the device, which can be found in device.status()?
I agree the documentation needs updating, and it's one of the things on my ToDo list.
In this case using the BulbDevice would be better as it auto-detects the proper DPs to use for the different bulb types. It also has a bunch of helper functions for setting intensity, color temperature, and colors.
d = tinytuya.BulbDevice(...)
d.turn_on()