am i doing smth wrong? #203
-
Tried to make a light switcher.
But when i try to perform an turn it on\off nothing happens. Although, i tried to control the color of bulb via |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
set_colour()
is only available withBulbDevice
, notOutletDevice
, so changed = tinytuya.OutletDevice('abc', 'abc', 'abc')
tod = tinytuya.BulbDevice('abc', 'abc', 'abc')
. As that is a "Type B" bulb device, it uses DPS 20 for on/off control instead of the default DPS 1; you need to either make the aboveOutletDevice
->BulbDevice
change (since BulbDevice handles this for you) or passswitch=20
to turn_on/turn_off withd.turn_off(switch=20)