-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
fix: show hex number along with the unknown
strings
#801
Conversation
🚧 It seems like this PR has lint errors 🚧
I should be able to fix them for you. If you want me to, just comment |
My 2C. I would also add some padding here, to remain consistent
@robertsLando, |
🚧 It seems like this PR has lint errors 🚧
I should be able to fix them for you. If you want me to, just comment |
1 similar comment
🚧 It seems like this PR has lint errors 🚧
I should be able to fix them for you. If you want me to, just comment |
Thank you for the suggestion. I found an existing method, utils.num2hex() meant for this purpose and updated. |
lib/ZwaveClient.js
Outdated
const deviceConfig = zwaveNode.deviceConfig || { | ||
label: 'Unknown product ' + zwaveNode.productId, | ||
description: zwaveNode.productType, | ||
manufacturer: 'Unknown manufacturer ' + zwaveNode.manufacturerId | ||
label: 'Unknown product ' + utils.num2hex(zwaveNode.productId), | ||
description: utils.num2hex(zwaveNode.productType), | ||
manufacturer: 'Unknown manufacturer ' + utils.num2hex(zwaveNode.manufacturerId) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already evaluate this values later here. I suggest you to move that at the start of initNode function and use the values from the array. Also remember to use zwaveNnode
instead of node
unknown
strings
Per request from @robertsLando, evaluation of hexIds is moved above the initialization of deviceConfig. Backtick templates used to generate labels in place of string concatenation to remain consistent with surrounding code.
Pull Request Test Coverage Report for Build 622900091
💛 - Coveralls |
The accepted convention for representing manufacturer and product identifiers appears to use hexadecimal.