mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
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:
parent
5b3e901e58
commit
44e32e9b01
@ -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)
|
||||
|
||||
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
|
||||
- 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.
|
||||
|
||||
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
|
||||
|
||||
Add the following lines to your `configuration.yaml` file:
|
||||
|
Loading…
x
Reference in New Issue
Block a user