Google Calendars


The Google integration allows you to connect to your Google Calendars 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.

Generate Client ID and Client Secret

Configuration

Adding Google Calendars to your Home Assistant instance can be done via the user interface, by using this My button:

Manual configuration steps

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.

OAuth and Device Authorization steps

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.

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.

Attributes

Service google.create_event

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

Create Event Service details

More Configuration

More Configuration