Closed acoulson2000 closed 6 years ago
Thanks. I've changed getStatus and setStatus to get and set. I've been having issue since a power cut last week so can't test the fix, there maybe some other changes required.
Thanks for that. I had to remove the "tuya.destroy();" too. That api has apparently been removed. After that, the script seems to work via command line.
Can you explain how the items and rules are intended to work? I trimmed them down to just a single device with some name changes, but they don't appear to work for me. I'm not clear how the arguments in the "String
OK. I copied the new template in from codetheweb/tuyapi. It kind of works now but I'm getting errors most of the time. I might just move over to one of the net or python ports.
I've copied my config rule over to the temperature.rules. Essentially you set the id and key as a variable in the rule then send a command to tuya_config and it assigns those values to the details item. So the rule just adds the items value to the exec command.
OK. I've rewritten the interface to limit the get calls to one. On change state it relies upon the return value and infers the new state. This seems to fix the errors and everything seems to be working fine with version 2 of the tuyapi.
Seems like getStatus() and SetStatus() have changed to get() and set().