The Google Calendar integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to connect your Google Calendar to Home Assistant. The integration adds calendarA calendar entity represents a schedule of events coming from a local or external calendar source. It can be used to trigger automations based on the start or end of an event, react to offsets (like 15 minutes before), or retrieve event details through services. [Learn more] entities that are shown on the Calendar dashboard, and can be used for automations based on any event, or limited to specific matching criteria.
Prerequisites
You need to configure developer credentials to allow Home Assistant to access your Google Account. The current recommended approach is to create Web Auth credentials for Google Calendar since the same credentials work for all Google integrations. Previously, this integration only supported Device Auth and those credentials are no longer recommended. You can continue to use Device Auth credentials but they will only work with 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 Calendar 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 Calendar 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 Calendar.
Troubleshooting
If the setup process fails and you see an error message such as Authentication code expired, please try again you may want to try the flow again. You may also check the logs for additional error messages that may indicate a misconfiguration such as an invalid client id or secret.
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 Google Calendar in Home Assistant and how you can trigger an automation based on a calendar event.
Calendar entities
Each Google Calendar from My Calendars (more info) is represented as a calendar entity in Home Assistant.
For example, your calendar named Personal is created as entity calendar.personal. You may rename an entity, or disable any entities which you don’t need.
Calendar event automations
Individual Calendar Events are what is powering automations such as:
- Turn on a light at the start of the event named Front Yard Light
- Send a notification 5 minutes before the start of any event
- Stop the media player 30 minutes after the end of the event named Exercise.
See calendar automations for an overview, and read more about calendar trigger variables for the available information you can use in a condition or action such as the event summary, description, location and more.
Calendar entity attributes
The calendar entity has additional attributes related to a single next upcoming event.
Tip
Using the entity state and attributes is more error prone and less flexible than using Calendar Automations. The calendar entity itself may only track a single upcoming active event and can’t handle multiple events with the same start time, or overlapping events.
List of actions
The Google Calendar 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.
-
Create event in Google Calendar (
google.create_event) Adds a new event to a calendar in Google Calendar.
For an overview of every action across all integrations, see the actions reference.
