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.

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 access your account and Calendars.

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 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