Home Assistant now manages OAuth2 application credentials

Updated on
Home Assistant Core 2022.6
Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.

Integrating certain services, such as Google Calendar, Spotify, and Xbox has been one of the more daunting tasks for those new to Home Assistant. Many of us are users of these services, and yet they are on the trickier side to set up from scratch. The upcoming release of Home Assistant Core 2022.6 will make this hurdle somewhat easier to jump, by managing OAuth2 application credentials directly from the UI, and by setting up redirect URLs automatically. This article will explain what these changes entail, and why this is a good development for Home Assistant.


Good news for haters of text editors, as this change is yet another step to a YAML-free future, as the configuration.yaml file now remains untouched when integrating the following services with Home Assistant:

  • Google Calendar
  • Spotify
  • Home Connect
  • Honeywell Lyric
  • Neato Botvac
  • Netatmo
  • Withings
  • Xbox

It is worth noting that some of the above listed services already supported a YAML-free integration before the release of Home Assistant Core 2022.6. If so, the upcoming changes solely mean that the YAML configuration will be deprecated in a future release of Home Assistant Core.


Table of Contents

Do I need to change anything if I’m updating Home Assistant Core?

Fortunately, any existing OAuth2 application credentials in the YAML configuration file will automatically be imported once you hit the update button. As usual, the developers did this with plenty of forethought, as the YAML configuration will be removed in a future Home Assistant release.

How has integrating Google Calendar with Home Assistant got easier?

The upcoming changes to Home Assistant Core unfortunately do not remove the requirement for a Client ID and Client Secret. You must still go through the previous steps to acquire these from the Google Developers Console. The updated integration will remove the need to add the information gathered from the Google Calendar API to the configuration.yaml file. Instead, you add these two pieces of information to appropriate fields when configuring the integration from the dashboard. The following line will subsequently be removed from the YAML configuration:

  client_id: YOUR_CLIENT_ID
  client_secret: YOUR_CLIENT_SECRET

This not only spares you from having to edit the file, but will also make sure that you never accidentally share the Client ID and Client Secret with strangers. All in all, this change is big news for Home Assistant, as it will make the integration of popular services easier and safer.

Other changes to the Google Calendar integration

It isn’t just the authentication process that has changes when integrating Google Calendar with Home Assistant. The integration now behaves like other integrations set up in the dashboard, rather than the YAML configuration. Home Assistant now lists your individual calendars as entities, and you can also set the appropriate permission (read and write or read-only) straight from the integrations page, by clicking on the configure button.

The Google Calendar integration in Home Assistant Core 2022.6
The Google Calendar integration in Home Assistant Core 2022.5

What this also allows you to do is easily customize your calendars. From the entities page, you can enable, disable, or hide calendars. Just as with any other entity, you can also use the graphical interface to change a calendars name, entity ID (i.e., calendar.something), icon, and area.

The new integration with Google Calendar allows you to customize a calendar in the graphical interface
The new integration with Google Calendar lists your calendars as entities

For comparison, the old configuration looked something like this:

- cal_id: "*****@group.calendar.google.com"
  - device_id: test_everything
    name: Give me everything
    track: true
Liam Alexander Colman, the author and maintainer of Home Assistant Guides.

About Liam Alexander Colman

Liam Alexander Colman has been using Home Assistant for various projects for quite some time. What started off with a Raspberry Pi quickly became three Raspberry Pis and eventually a full-blown server. I now use Unraid as my operating system, and Home Assistant happily runs in a Docker container. My personal setup includes many Zigbee devices as well as integrations with existing products such as my Android TV box. Read on to find out more on how I got started with Home Assistant.

Leave a comment

Share to...