We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thisRequest.dps[options.dps.toString] = options.set;
Seems to be missing the () behind toString. This caused issues setting dps values with using this package from homebridge.
For example:
tuya.set({id: 'xxxxxxxxxxxxxxxxxxxx', 'dps': 2, set: true}).then(() => console.log('device was changed'))
Would fail because toString is not a function in prototype.
Proposed change:
thisRequest.dps[options.dps.toString()] = options.set;
or even:
if (options.dps === undefined) { thisRequest.dps = {1: options.set}; } else { thisRequest.dps = {}; thisRequest.dps[options.dps] = options.set; }
tuyapi/index.js
Line 233 in 290d6e9
The text was updated successfully, but these errors were encountered:
Oops, thanks for the heads up. (I should really get around to adding test cases.) Should be fixed now.
Sorry, something went wrong.
Thank you @codetheweb
No branches or pull requests
thisRequest.dps[options.dps.toString] = options.set;
Seems to be missing the () behind toString. This caused issues setting dps values with using this package from homebridge.
For example:
tuya.set({id: 'xxxxxxxxxxxxxxxxxxxx', 'dps': 2, set: true}).then(() => console.log('device was changed'))
Would fail because toString is not a function in prototype.
Proposed change:
thisRequest.dps[options.dps.toString()] = options.set;
or even:
tuyapi/index.js
Line 233 in 290d6e9
The text was updated successfully, but these errors were encountered: