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

Add Withings support #25154

Merged
merged 9 commits into from Aug 31, 2019

Conversation

@vangorra
Copy link
Contributor

commented Jul 15, 2019

Reopening #21625

Description:

Adding support for connecting to Withings apis to integrate health data into home assistant.

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8816

Example entry for configuration.yaml (if applicable):

# Example configuration.yaml entry
withings:
    client_id: <client id from previous step>
    client_secret: <consumer secret from previous step>
    profiles: 
        - <name of user profile>

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@balloob

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

Did you address my comments from the previous PR?

@vangorra

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

Yes. The config flow changes were especially welcomed as it simplified the code.

@vangorra vangorra referenced this pull request Jul 16, 2019
2 of 2 tasks complete
@MartinHjelmare MartinHjelmare added this to Review in progress in Dev Jul 23, 2019
@vangorra vangorra requested review from Adminiuga, andrewsayre, awarecan, bachya, dmulcahey, Jc2k, Kane610, zxdavb and home-assistant/core as code owners Aug 11, 2019
@vangorra vangorra requested a review from Aug 11, 2019
@vangorra vangorra requested a review from home-assistant/z-wave as a code owner Aug 11, 2019
@homeassistant

This comment was marked as outdated.

Copy link
Contributor

commented Aug 11, 2019

Hello @vangorra,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

@vangorra vangorra force-pushed the vangorra:vangorra_withings branch from 39a0c91 to 6cc9786 Aug 11, 2019
@homeassistant

This comment was marked as outdated.

Copy link
Contributor

commented Aug 11, 2019

Hello @vangorra,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

@vangorra vangorra force-pushed the vangorra:vangorra_withings branch from 6cc9786 to 2849e05 Aug 11, 2019
@vangorra

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2019

I didn't realize changing my github email would be so messy. At any rate the PR is updated and addresses the latest feedback.

@MartinHjelmare MartinHjelmare removed request for awarecan and Kane610 Aug 12, 2019
@project-bot project-bot bot moved this from Review in progress to Needs review in Dev Aug 12, 2019
@MartinHjelmare MartinHjelmare moved this from Needs review to Review in progress in Dev Aug 12, 2019
@vangorra vangorra force-pushed the vangorra:vangorra_withings branch from b33f396 to 17b49d0 Aug 17, 2019
Copy link
Member

left a comment

I think we can merge after these comments are addressed.

homeassistant/components/withings/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/withings/strings.json Outdated Show resolved Hide resolved
homeassistant/components/withings/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/withings/common.py Outdated Show resolved Hide resolved
homeassistant/components/withings/common.py Outdated Show resolved Hide resolved
vangorra added 9 commits Aug 12, 2019
Addressing PR feedback.
Cleaning up some static code checks.
Fixing bug with saving credentials.
@vangorra vangorra force-pushed the vangorra:vangorra_withings branch from e64f90d to 3fb288d Aug 27, 2019
Copy link
Member

left a comment

Great!

Dev automation moved this from Review in progress to Reviewer approved Aug 31, 2019
@MartinHjelmare MartinHjelmare merged commit 614cf74 into home-assistant:dev Aug 31, 2019
9 checks passed
9 checks passed
CI Build #20190827.32 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
Dev automation moved this from Reviewer approved to Done Aug 31, 2019
@lock lock bot locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
4 participants
You can’t perform that action at this time.