Add Apple iCloud Calendar to Home Assistant

While building my Lovelace dashboard, I wanted to include my family calendar, which for our home was created and shared through Apple’s iCloud and shared calendars. Most instructions show how to use a Google calendar with Home Assistant, but do not go over the process to add your iCloud calendar. We can do this with App Passwords and the caldav component of Home Assistant.

To get started, we will need to generate an app-specific password in the Apple ID settings. To do this, visit appleid.apple.com from a web browser and sign in. Once you are signed in, scroll down to the Security section, and locate APP-SPECIFIC PASSWORDS. Click on Generate Password. Give the password a label, then click Create.

Once you’ve created a name, you will be asked to verify your identity by entering your iCloud password. After this, the password is generated and provided to you on the screen. Make a note of the password, then click Done.

Now that we have the app-specific password configured, we can add the calendar to Home Assistant.

Log into your Home Assistant interface, then edit the configuration.yaml file. We will be using the caldav component of Home Assistant for this, so we will call it out in the configuration file. You can find more about caldav on the Home Assistant Website: https://www.home-assistant.io/integrations/caldav/

You can choose to use a separate secrets.yaml file for the passwords, but I just added the app password directly to my configuration.yaml file. You’ll want to use this format, or reference the link above:

# Calendar

calendar:
  - platform: caldav
    url: https://caldav.icloud.com
    username: icloudemailaddress@icloud.com
    password: app-password-from-above
    calendars:
      - Calendar You Want Integrated

Replace the username with your iCloud email address and the password with the app-password that we created in the first steps. Lastly, you can name which calendars you want to integrate. You can find the names of these calendars on the iCloud Website under the Calendar app.

Once you are done, navigate to Configuration > Server Controls and check your configuration.yaml file for any errors.

Lastly, restart your Home Assistant under Server Management.

A new entity will be created called calendar.Name_of_Calendar that can be used with the Lovelace calendar card. I also really like the look of Atomic Calendar Revive, which is available via HACS.

Your calendar is now integrated with Home Assistant! Let me know if you have any questions in the comments below.

Interested in what products I am using in my Home Assistant and HomeKit setup? Check out recommended products here: https://technogecko.net/products/