8000 Google assistant storage of connected agents by elupus · Pull Request #29158 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Google assistant storage of connected agents #29158

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

Merged
merged 12 commits into from
Dec 3, 2019

Conversation

elupus
Copy link
Contributor
@elupus elupus commented Nov 27, 2019

Description:

This adds support for remembering which user agent have connected to your home assistance instance and gives support for disconnect calls as well as separate listed entities for different users.

Example entry for configuration.yaml (if applicable):

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.
  • I have followed the development checklist

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

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

@probot-home-assistant
Copy link

Hey there @home-assistant/cloud, mind taking a look at this pull request as its been labeled with a integration (cloud) you are listed as a codeowner for? Thanks!

@probot-home-assistant
Copy link

Hey there @home-assistant/cloud, mind taking a look at this pull request as its been labeled with a integration (google_assistant) you are listed as a codeowner for? Thanks!

@elupus elupus force-pushed the google_assistant_storage_2 branch from 9b45727 to 12817cf Compare November 28, 2019 21:30
@elupus
Copy link
Contributor Author
elupus commented Nov 28, 2019

Nice, this pull is starting to look quite clean now.

Do we need an upgrade function? The store will be empty for upgrading users. A user that have already connected would need to relink, issue a sync by refreshing in google home, explicitly do a sync request from HA. I think that is enough to mention in release notes.

@elupus elupus marked this pull request as ready for review November 29, 2019 14:11
def async_schedule_google_sync_all(self):
"""Schedule a sync for all registered agents."""
for agent_user_id in self._store.agent_user_ids:
self.async_schedule_google_sync(agent_user_id)
Copy link
Member

Choose a reason for hiding this comment

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

We don't have to keep async_schedule_google_sync around, we will never want a single sync to be done ? Probably same for a bunch of other methods that involve a single action instead of doing it for all connected users

Copy link
Member

Choose a reason for hiding this comment

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

nevermind, realize now that the per-agent-user-id methods are implemented by the implementations and not the base class.

@balloob balloob merged commit 2569c4a into home-assistant:dev Dec 3, 2019
@lock lock bot locked and limited conversation to collaborators Dec 4, 2019
@elupus elupus deleted the google_assistant_storage_2 branch January 2, 2020 17:26
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
0