Skip to content
New issue

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

dps=1 is hardcoded in index.js #42

Closed
law1964 opened this issue Jun 14, 2018 · 2 comments
Closed

dps=1 is hardcoded in index.js #42

law1964 opened this issue Jun 14, 2018 · 2 comments

Comments

@law1964
Copy link

law1964 commented Jun 14, 2018

This only affects devices with more than one channel so is not a high priority.

Adding an if clause like the following to index.js around line 190 will fix it:

      if (options.dps !== undefined) {
          resolve(data.dps[options.dps]);
      }
      else {
          resolve(data.dps['1']);
      }

Thanks!

@codetheweb
Copy link
Owner

This is actually already sort of supported - you can call get({schema: true}). But that returns everything. Your way is much more simple and elegant. 👍

Will add in next release.

@codetheweb
Copy link
Owner

Added in a621cd6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants