Skip to content

Use device ID as input for zwave_js WS device cmds#71667

Merged
raman325 merged 4 commits intohome-assistant:devfrom
raman325:device_id
May 19, 2022
Merged

Use device ID as input for zwave_js WS device cmds#71667
raman325 merged 4 commits intohome-assistant:devfrom
raman325:device_id

Conversation

@raman325
Copy link
Contributor

@raman325 raman325 commented May 10, 2022

Proposed change

As discussed in home-assistant/frontend#12642 we can simplify the frontend logic by accepting device ID as input instead of config entry ID and node ID in places where the device is known already.

Dependent on home-assistant/frontend#12658

Primary changes:

  • Removed ping_node WS API call because we will never use it now that we have the ping button entity
  • Switched from node ID and config entry ID to device ID anywhere we are using the inputs to get a node from the driver
  • Updated network_status WS API call to include node status instead just a list of node IDs. This removes a bunch of unnecessary calls to the node_status API

Type of change

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

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @home-assistant/z-wave, mind taking a look at this pull request as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@raman325 raman325 marked this pull request as draft May 11, 2022 02:15
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@raman325 raman325 merged commit 487819b into home-assistant:dev May 19, 2022
@raman325 raman325 deleted the device_id branch May 19, 2022 17:31
0bmay pushed a commit to 0bmay/home-assistant-core that referenced this pull request May 19, 2022
)

* Use device ID as input for zwave_js WS device cmds

* Additionally missed commands, update network_status command to include node status data

* revert change to removed function

* Revert register device change
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2022
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