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
- Home Connect
- Honeywell Lyric
- Neato Botvac
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.
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:
google: 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.
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.
For comparison, the old configuration looked something like this:
- cal_id: "*****@group.calendar.google.com" entities: - device_id: test_everything name: Give me everything track: true
Leave a comment