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

[BUG] Display bug in associations #766

Closed
radiationnow opened this issue Feb 27, 2021 · 2 comments · Fixed by #780
Closed

[BUG] Display bug in associations #766

radiationnow opened this issue Feb 27, 2021 · 2 comments · Fixed by #780

Comments

@radiationnow
Copy link

Description:
Using the ZwaveJS2MQTT HomeAssistant addon (V0.5.0), the control panel shows lifeline associations to node 2, not to node 1. The associations themselves appear to be made to node 1, so this seems to be purely a display bug.

Describe the bug
Lifeline group associations show association to node 2, instead of the expected association to the controller (node 1). Removing the association and adding an association to node 1 again displays as an association to node 2.

I also verified that other associations, at least in group 1, also exhibit this off-by-1 behavior. (E.G., association to node 5 displays as an association to node 6.)

Expected behavior
Name of associated node displayed should reflect the associated node, rather than the name of nodenumber+1.

@osenft
Copy link
Contributor

osenft commented Feb 28, 2021

Please see proposed fix in PR #769.

@osenft
Copy link
Contributor

osenft commented Feb 28, 2021

This problem is caused by looking up by index, rather than ID. The off-by 1 was pure coincidence: while the array is indexed from 0 and IDs start at 1, this breaks if an ID is skipped. The lookup was plainly wrong.

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