The Google Sheets integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to connect your Google Drive to Home Assistant. The integration adds an action to allow you to append rows to a Sheets document. The idea is that you can store data on there for further processing. When you set up a config entry, your drive will have a new sheet called Home Assistant. You can then rename this to whatever you like.
Note: The integration currently only has access to that one document that is created during setup.
Prerequisites
You need to configure developer credentials to allow Home Assistant to access your Google Account. These credentials are the same as the ones for Nest, YouTube, and Google Mail. These are not the same as Device Auth credentials previously recommended for Google Calendar.
Scenario 1: You already have credentials
In this case, all you need to do is enable the API:
- Go the Google Developers Console Google Drive API and Google Sheets API .
- Confirm the project and Enable the API.
- Continue with the steps described in the Configuration section.
Scenario 2: You do not have credentials set up yet
In this case, you need to generate a client secret first:
Configuration
To add the Google Sheets service to your Home Assistant instance, use this My button:
The integration setup will next give you instructions to enter the Application Credentials (OAuth Client ID and Client Secret) and authorize Home Assistant to connect to Google Sheets.
List of actions
The Google Sheets integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.
-
Append sheet (
google_sheets.append_sheet) Adds rows of data to a Google Sheets document. -
Get sheet (
google_sheets.get_sheet) Retrieves rows of data from a Google Sheets document.
For an overview of every action across all integrations, see the actions reference.
Troubleshooting
If you have an error with your credentials you can delete them in the Application Credentials user interface.
Video tutorial
This video tutorial explains how to set up the Google Sheets integration and how you can add data from Home Assistant to a Google Sheet.
