Add Calendar Events To Sonarr Integration

I’ve just recently found the radarr and sonarr integrations and have noticed that the radarr integration is able to add calendar events to HomeAssistant. Adding something similar to Sonarrs would be ideal as well since they’d allow for a nice preview of what’s to come.

A workaround to get the Sonarr calendar is link the iCal through another calendar service and then use a calendar integration e.g. Google Calendar to link it into Home Assistant, which will then be imported into the Home Assistant Calendar.

It is interesting there is no direct iCal integration only local or CalDAV.

@autinerd is this your integration?
could you integrate this with the calendar similar to radarr?

There was this PR that became stale: Add a calendar entity to Sonarr by SplinterHead · Pull Request #84227 · home-assistant/core · GitHub

I don’t know how much the APIs differ, but, I wonder if *arr services could be coded into a shared generic base class.

You can also use this integration and then use the ics link directly:
franc6/ics_calendar: Provides an ICS (icalendar) platform for the Home Assistant calendar (github.com)

Thanks for this. I did see this, but it’s interesting iCal is not a native supported feature. In my case, using Google Calendar works, because I’m already using Google integrations, but the HACS integration seems like a direct way without further work.

1 Like

Sorry for the late reply but I was searching for a solution for this and eventually made my own.

  1. just create a local calendar first, and create at least one event or the local file is not generated.
  2. via command line go and search for that file. In my case I’m using a docker installation, so I opened a shell inside my container and did a find . -name *.ics that found the calendar just created.
  3. now the trick is to download and overwrite the .ics file using the link sonarr provides. Go to sonarr, calendar, top left there is a button called ical link. Customize the flags as you wish and copy the link.
  4. create a shell script like this and put where you usually put shell scripts (in my case, a directory called “shell”):
#!/bin/bash

wget http://192.168.x.y:8989/feed/v3/calendar/Sonarr.ics?apikey=whateverisyourapi -O /config/.storage/local_calendar.sonarr.ics

Put the url just like sonarr generates it and after the -O the path of the .ics file. In my setup (docker container) that path is correct but it may differ in other setups.

  1. final point, reload the local calendar manually and you will see all the sonarr stuff in HA calendar.

  2. Create a daily automation that executes the shell script (using HA shell command integration)AND reload the local calendar integration.