tinytuya icon indicating copy to clipboard operation
tinytuya copied to clipboard

Include dps Comment in Snapshot.py Example

Open RavaszEmber opened this issue 7 months ago • 1 comments

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

RavaszEmber avatar Apr 27 '25 20:04 RavaszEmber

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

uzlonewolf avatar Apr 27 '25 20:04 uzlonewolf