Update google_pubsub.markdown (#14518)

You must first create the pub/sub topic because if you haven't one already the role you should choose for the service account is not available as an option.
This commit is contained in:
mariwing 2020-09-16 21:48:35 +02:00 committed by GitHub
parent 5b3e901e58
commit 44e32e9b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,16 +13,15 @@ The `google_pubsub` integration allows you to hook into the Home Assistant event
This assumes you already have a Google Cloud project. If you don't, please create one in the [Google Cloud Console](https://console.cloud.google.com/projectcreate) This assumes you already have a Google Cloud project. If you don't, please create one in the [Google Cloud Console](https://console.cloud.google.com/projectcreate)
You need to create a Service Account key in the [Google Cloud API Console](https://console.cloud.google.com/apis/credentials/serviceaccountkey) Create a Google Pub/Sub topic in the [Google Cloud API Console](https://console.cloud.google.com/cloudpubsub/topicList). The topic name will become something like `projects/project-198373/topics/topic-name`. Note the last part only (the name you chose): `topic-name`.
Next, you need to create a Service Account key in the [Google Cloud API Console](https://console.cloud.google.com/apis/credentials/serviceaccountkey)
- Choose a new "New Service Account", give it a name and leave the key type as JSON - Choose a new "New Service Account", give it a name and leave the key type as JSON
- Select the role: Pub/Sub Publisher - Select the role: Pub/Sub Publisher
This will download the Service Account JSON key to your machine. Do NOT share this with anyone. Place this file in your Home Assistant configuration folder. This will download the Service Account JSON key to your machine. Do NOT share this with anyone. Place this file in your Home Assistant configuration folder.
Next, create a Google Pub/Sub topic in the [Google Cloud API Console](https://console.cloud.google.com/cloudpubsub/topicList). The topic name will become something like `projects/project-198373/topics/topic-name`. Note the last part only (the name you chose): `topic-name`.
## Configuration ## Configuration
Add the following lines to your `configuration.yaml` file: Add the following lines to your `configuration.yaml` file: