Skip to content

Add wizards for adding and removing Z-Wave JS nodes#8174

Merged
bramkragten merged 9 commits intohome-assistant:devfrom
cgarwood:zwjs_add_remove_node
Jan 25, 2021
Merged

Add wizards for adding and removing Z-Wave JS nodes#8174
bramkragten merged 9 commits intohome-assistant:devfrom
cgarwood:zwjs_add_remove_node

Conversation

@cgarwood
Copy link
Copy Markdown
Member

@cgarwood cgarwood commented Jan 16, 2021

Proposed change

Adds an add node and remove node wizard to the Z-Wave JS config panel.

Depends on backend PR home-assistant/core#45232

AddingNode.mp4
RemoveNode.mp4

Cancel Inclusion/Cancel Exclusion buttons in the video were leftover from debugging and have been removed in the PR.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@cgarwood
Copy link
Copy Markdown
Member Author

Backend PR has been merged

Comment on lines +227 to +230
this.hass.callWS({
type: "zwave_js/stop_inclusion",
entry_id: this.entry_id,
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause an inclusion stopped event?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the Z-Wave controller was in inclusion mode it will trigger an inclusion stopped event, otherwise no.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we then call unsubscribe twice?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the actual unsubscribe part up so we unsubscribe the listener before firing the stop_inclusion/stop_exclusion websocket command

@cgarwood cgarwood force-pushed the zwjs_add_remove_node branch from 067c6a5 to 315f0d2 Compare January 21, 2021 15:20
@cgarwood cgarwood requested a review from bramkragten January 21, 2021 15:47
@bramkragten bramkragten merged commit a3339c9 into home-assistant:dev Jan 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants