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 quality scale for nest integration #131330

Merged
merged 8 commits into from
Dec 11, 2024

Conversation

allenporter
Copy link
Contributor

Proposed change

Add quality scale for nest integration and tag currently implemented features of the bronze scale.

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)
  • Deprecation (breaking change to happen in the future)
  • 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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format 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.

To help with the load of incoming pull requests:

@allenporter allenporter marked this pull request as draft November 23, 2024 16:16
@allenporter
Copy link
Contributor Author

allenporter commented Nov 23, 2024

Update some status that were incorrect and added more detailed comments in the status.

@allenporter allenporter marked this pull request as ready for review November 23, 2024 16:28
Comment on lines +21 to +22
The integration does a connection test in the configuration flow, however
it does not fail if the user has ipv6 misconfigured.
Copy link
Member

Choose a reason for hiding this comment

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

how does that work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how does that work

There are multiple APIs. There is the SDM API, then there is also the pubsub subscriber API. Right now it is only testing the SDM API and the pubsub subscriber is what often fails due to users misconfigurations of ipv6.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My impression is that this is the first time people notice since google uses ipv6 and not as many other things do. I think it would be nice if this could be detected some other way like Home Assistant noticing its misconfigured and not setting up the user with ipv6, but i'm not an ipv6 expert at all to know what makes sense here.

Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

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

Codewise looks good

Copy link
Contributor Author

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

I removed the done comments.

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
homeassistant/components/nest/quality_scale.yaml Outdated Show resolved Hide resolved
homeassistant/components/nest/quality_scale.yaml Outdated Show resolved Hide resolved
observed are related to ipv6 misconfigurations and the error messages
are not self explanatory and can be improved.
docs-high-level-description: done
config-flow-test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible for the user to reauth with a different account?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the original choice to use device access project id was because the nest API does not return any notion of identity. The device access project is currently the unique id and we've asked users to set this up to create their own project id, but theoretically you could share them across accounts.

In years following, the pattern that newer google integrations have followed is to additionally query the user identify API to get the account information. We could follow here also and enforce going forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this as a comment for re-authentication item in the silver category (didn't yet grade this yet)

Copy link
Member

Choose a reason for hiding this comment

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

Would sound nice, also if we can add more tests for that when that happens :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course -- all changes come with tests :)

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft December 11, 2024 10:45
@allenporter allenporter marked this pull request as ready for review December 11, 2024 16:08
@home-assistant home-assistant bot requested a review from joostlek December 11, 2024 16:08
@joostlek joostlek merged commit fa05cc5 into home-assistant:dev Dec 11, 2024
34 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
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.

4 participants