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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to zwave_js node metadata WS API #67210

Merged
merged 2 commits into from Mar 31, 2022

Conversation

raman325
Copy link
Contributor

@raman325 raman325 commented Feb 25, 2022

Proposed change

comments are a metadata field that the zwave-js project uses to note certain things about a device. A good example is to let users know that a given device is known to provide invalid meter values. It would be useful to display this information on the device panel somehow.

Here's what it looks like in the device DB:
image

Frontend PR: home-assistant/frontend#12173

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

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

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:

@raman325 raman325 requested a review from a team as a code owner February 25, 2022 06:15
@project-bot project-bot bot added this to Needs review in Dev Feb 25, 2022
@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)

Copy link
Contributor

@jkeljo jkeljo left a comment

Choose a reason for hiding this comment

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

Seems reasonable as far as it goes. Is there a corresponding PR in the frontend?

tests/components/zwave_js/test_api.py Outdated Show resolved Hide resolved
@MartinHjelmare
Copy link
Member

Yeah, we should have a plan for the frontend before we merge here.

@raman325
Copy link
Contributor Author

Seems reasonable as far as it goes. Is there a corresponding PR in the frontend?

Not yet as we haven't determined how we will display all of this metadata. I was going to mess with this to see if I could get a good frontend PR going for it but it shouldn't block this PR since it's an update to an existing API command

@raman325
Copy link
Contributor Author

Yeah, we should have a plan for the frontend before we merge here.

OK, I can look into it. But given that we are already making other metadata available to the frontend with this command, does it not seem like this should be OK to merge for now?

@MartinHjelmare
Copy link
Member

As I understand it, adding data to the commands isn't insignificant when it comes to processing time in the frontend. I think we should know that we'll use the data and how we'll use it before adding it.

@raman325
Copy link
Contributor Author

I was not aware of that. We can discuss this in more detail on Discord if need be but perhaps this is better as a separate API command then. The rest of the metadata doesn't need to be displayed on the device panel every time, I think we can put it in a modal or on a separate page. This seems like something that's worth display on the device panel.

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 27, 2022
Dev automation moved this from Needs review to Reviewer approved Mar 31, 2022
@MartinHjelmare MartinHjelmare marked this pull request as draft March 31, 2022 10:08
@MartinHjelmare
Copy link
Member

Can be merged when frontend PR is approved.

@raman325 raman325 marked this pull request as ready for review March 31, 2022 14:31
@raman325 raman325 merged commit 4e2b6db into home-assistant:dev Mar 31, 2022
Dev automation moved this from Reviewer approved to Done Mar 31, 2022
@raman325 raman325 deleted the comments branch March 31, 2022 14:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2022
@raman325 raman325 added this to the 2022.4.1 milestone Apr 6, 2022
@raman325
Copy link
Contributor Author

raman325 commented Apr 6, 2022

This feature needs to be added to the release because the frontend changes were included in the release while this was not

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants