Closed Xenomes closed 5 months ago
Hi @Xenomes ,
The turn_on()
uses the CONTROL
command that calls generate_payload() which translates that to the right protocol template for your device version. It also formats the dictionary elements into the right payload.
Also:
tuya.generate_payload(tinytuya.CONTROL_NEW, {1: 'True'})
That's incorrect. It should be:
tuya.generate_payload(tinytuya.CONTROL_NEW, {1: True})
The "True" part should be a pythonic boolean, not a string.
Thanks for the explaining and you are correct i just need to boolean the value i got back. Thanks I overlooked this. 😅
Hi, I think I found a bug. I'm attempting to turn on an infrared heating panel using DPS codes, and I've noticed differences in the protocol to the turn_on() command.
The device doesn't react to "True"; if the device is on, it goes off.
This works as expected; the difference is the protocol version.