Add new configuration variables for request_sync (#3807)

* Add new configuration variables for request_sync

* Update google_assistant.markdown

Include note about initial sync with agent_user_id

* Change to api_key - remove homegraph prefix

* ✏️ Small spelling/grammar fixes
This commit is contained in:
r4nd0mbr1ck 2017-11-18 19:01:07 +11:00 committed by Paulus Schoutsen
parent 635d033845
commit 1a2b45f3ff

View File

@ -28,6 +28,8 @@ google_assistant:
project_id: someproject-2d0b8
client_id: [long URL safe random string]
access_token: [a different long URL safe random string]
agent_user_id: [a string to identify user]
api_key: [an API Key generated for the Google Actions project]
exposed_domains:
- switch
- light
@ -43,6 +45,8 @@ google_assistant:
* *project_id* (Required): Project ID from the Google Developer console (looks like `words-2ab12`)
* *client_id* (Required): A long random URL safe string (no spaces or special characters) that will be used for Implicit OAuth.
* *access_token* (Required): Another different long random URL safe string.
* *agent_user_id* (Optional): A string to identify the user, e.g., email address. If not provided, the component will generate one.
* *api_key* (Optional): An API Key generated for the project from Google Console. See setup below. If not provided then the request_sync service is not exposed
* *exposed_domains* (Optional): An array of Home Assistant domains to expose to Google Assistant. Options include:
- `switch`
- `light`
@ -123,3 +127,10 @@ homeassistant:
2. Under the gear icon, click `Permissions`
3. Click `Add`, type the new user's e-mail address and choose `Project -> Editor` role
4. Have the new user go to [developer console](https://console.actions.google.com/) and repeat steps starting from point 7.
11. If you want to use the request_sync service in Home Assistant, then Enable Homegraph API for your project:
1. Go to https://console.cloud.google.com/apis/api/homegraph.googleapis.com/overview
2. Select your project and click Enable Homegraph API
3. Go to Credentials and select API Key from Create Credentials
4. Note down the generated API Key and use this in the configuration
*Note:* The request_sync service requires that the initial sync from Google includes the agent_user_id. If not, the service will log an error that reads something like "Request contains an invalid argument". If this happens, then unlink the account from Home Control and relink.