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

created scene id is 'NaN' #45

Closed
hansmbakker opened this issue Feb 8, 2015 · 2 comments
Closed

created scene id is 'NaN' #45

hansmbakker opened this issue Feb 8, 2015 · 2 comments

Comments

@hansmbakker
Copy link

I'm using node-hue-api 1.0.3 and I have not set a custom scene id prefix.

When calling api.createScene, the resulting id is a NaN, whereas this should be a unique string.

Example result json:

{ lights: [ '4', '5', '6' ], id: 'NaN' }

I think the problem is in

HueApi.prototype._getScenePrefix = function () {
    return this._getConfig().scene_prefix;
};

I think it should be

HueApi.prototype._getScenePrefix = function () {
    return this._getConfig().scenePrefix;
};
@peter-murray
Copy link
Owner

Thanks, good find, my test coverage was not sufficient, I have now improved this.

Version 1.0.4 has been published to fix this.

@hansmbakker
Copy link
Author

thank you for the quick fix!

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

No branches or pull requests

2 participants