Google Calendar


The Google Calendar integration allows you to connect your Google Calendar to Home Assistant. The integration adds calendar 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:

  1. Go the Google Developers Console Google Calendar API .
  2. Confirm the project and Enable the API.
  3. 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 integration 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.

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.

Service google.create_event

You can use the service google.create_event to create a new calendar event in a calendar.

More configuration