Use device_id instead of config entry id and node id for zwave_js#12658
Merged
balloob merged 5 commits intohome-assistant:devfrom May 19, 2022
Merged
Use device_id instead of config entry id and node id for zwave_js#12658balloob merged 5 commits intohome-assistant:devfrom
balloob merged 5 commits intohome-assistant:devfrom
Conversation
22 tasks
Contributor
Author
|
The related core PR has been approved |
bramkragten
reviewed
May 18, 2022
| showZWaveJSHealNodeDialog(this, { | ||
| entry_id: this._entryId, | ||
| node_id: this._nodeId, | ||
| entry_id: this._entryId!, |
Member
There was a problem hiding this comment.
Do we still need entry_id here, can't we also make that work with device id?
Contributor
Author
There was a problem hiding this comment.
the entry ID is still needed by dialog-zwave_js-heal-node so that it can get the network status here:
dialog-zwave_js-heal-node but we currently already have to figure out entry ID in ha-device-actions-zwave_js so that we can add it to the URL, so why recalculate it? Is it necessary to add it to the URL though? I couldn't figure out why we do that, and if it's not necessary, we can just pass the device ID in and only calculate entry ID in the heal node dialog
Contributor
Author
There was a problem hiding this comment.
another alternative would be to allow fetchZwaveNetworkStatus to accept either an entry ID or a device ID since it's used in both contexts. This could easily be supported in the core
Member
There was a problem hiding this comment.
Sounds like the nicest approach
Member
There was a problem hiding this comment.
Want to merge this and do that in a new PR?
bramkragten
reviewed
May 18, 2022
...panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts
Show resolved
Hide resolved
bramkragten
previously approved these changes
May 18, 2022
balloob
reviewed
May 18, 2022
...els/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts
Show resolved
Hide resolved
balloob
reviewed
May 18, 2022
...panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts
Show resolved
Hide resolved
…wave_js/ha-device-actions-zwave_js.ts Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
…wave_js/ha-device-info-zwave_js.ts Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
bramkragten
approved these changes
May 19, 2022
This was referenced May 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Instead of using config entry ID and node ID for any device specific WS commands, we now use device_id. This replaces #12642
Fixes #12641
Fixes #12136
Dependent on home-assistant/core#71667
Primary changes:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: