Integrate Arr Calendars | View TV Schedules | Get Alerts

Integrate Arr Calendars | View TV Schedules | Get Alerts

I wanted a way to view my TV Show schedule inside Home Assistant. Even more I wanted to get alerts when my favorite show was about to air.

💡
We do not condone piracy, This is to strictly build an interactive TV Schedule with notifications. What you do outside the scope of this post is on you!

Requirements:

Radarr Integration
Sonarr Integration
Calendar Card Pro

Radarr (Movie Release) Calendar

  1. Add it via Settings > Integrations.
  2. Fill out the information for your Radarr Instance URL and API Key.
  3. Once you have the Integration setup you should see a Radarr Calendar entity inside the Radarr Integration page.
  4. Download the Radarr integration via HACs. Restart Home Assistant.
  5. You can get the API key in Radarr via Settings > General.
💡
Know that by default it uses your "Availability" setting in Radarr to determine when to put content on the calendar. For example, I don't care when a movie hits theaters. I want to know the date it has a Bluray or hits streaming services so I set "Minimum Availability" to "Released" for all movies.

We are done with this integration. Lets move on to Sonarr and then we will look at the Calendar Card itself after.

Sonarr (TV Guide) Calendar

The Sonarr Calendar isn't as easy to get integrated unfortunately as the Sonarr integration does not expose the calendar like the Radarr integration for some strange reason. Seriously if the Sonarr Integration dev is reading this... WTF dude?

Go to Calendar view in Sonarr.
1. Click the Forcast tab to show the upcoming movies.
2. Click "iCal Link". Under Tags add "Unreleased". Select Unmonitored if you need it (you probably don't.
4. Copy your link. We will need it for the next step.

Create TV Calendar in Home Assistant

  1. Go to HACS and search for ics_calendar. Download and Install. Restart Home Assistant.
  2. Go to Settings > Devices and Services > Integrations
  3. Install ics_calendar integration.
  4. Add a Calendar and name it "Sonarr Calendar"
  5. Set the amount of days you want to view at a time like 7 days. Click Next.
  6. Leave the defaults on the next page.
  1. Paste your link in the URL field and leave the next 2 checkboxes unchecked. Click Submit.

Lovelace Calendar Card | Calendar Card Pro

To install this go to HACS and search for "Calendar Card Pro" and click Install.
I would also go ahead and install Bubble Card if you want to just copy/paste my example below.

Here is the YAML for the Calendar Card inside a Bubble Card.

type: vertical-stack
cards:
  - type: custom:bubble-card
    card_type: pop-up
    hash: "#calendar"
    name: TV Calendar
    icon: mdi:calendar
  - entities:
      - entity: calendar.sonarr_calendar
    days_to_show: 14
    first_day_of_week: ""
    date_vertical_alignment: ""
    time_24h: ""
    weather:
      position: date
      date:
        show_conditions: true
        show_high_temp: true
        show_low_temp: false
        icon_size: 14px
        font_size: 12px
        color: var(--primary-text-color)
      event:
        show_conditions: true
        show_temp: true
        icon_size: 14px
        font_size: 12px
        color: var(--primary-text-color)
    type: custom:calendar-card-pro
💡
Don't worry if you calendar is empty in the preview in the Gui editor. It was for me also. It should show properly in the normal dashboard view.

Notifications:

So maybe you want to get notifications when a movie is released. Or just get a notfication when an episode of your favorite show is airing.

This code pulls the values for the Radarr Calendar Attributes: message and description and release type.

Let's look at the code:

alias: Daily Movie Release Notification
description: Sends a notification about the next movie release at 12 PM.
triggers:
  - at: "12:00:00"
    trigger: time
conditions: []
actions:
  - data_template:
      title: Upcoming Movie Release
      message: >
        {% set next_event = state_attr('calendar.radarr', 'message') %} {% set
        description = state_attr('calendar.radarr', 'description') %} {% set
        release_type = state_attr('calendar.radarr', 'release_type') %} {% if
        next_event %}
          🎬 {{ next_event }} is coming up! 
          Description: {{ description or "No description provided." }}
          Release Type: {{ release_type or "Unknown" }}
        {% else %}
          No upcoming movie releases found.
        {% endif %}
    action: notify.mobile_app_pixel_8

TV Show Notifications

What if you want to get a notification right before your favorite show starts? Or maybe just want is airing tonight? I am gonna show you 2 examples:

Example: Track Specific TV Show: Godfather of Harlem

alias: TV Show Notification - Godfather of Harlem
description: Sends a notification when a TV show episode "Godfather of Harlem" is found in the calendar.
trigger:
  - platform: template
    value_template: >
      {{ 'Godfather of Harlem' in state_attr('calendar.sonarr_calendar', 'message') | default('') }}
condition: []
action:
  - service: notify.mobile_app_pixel_8
    data_template:
      title: "TV Show Alert: Godfather of Harlem"
      message: >
        {% set next_event = state_attr('calendar.sonarr_calendar', 'message') %}
        {% set description = state_attr('calendar.sonarr_calendar', 'description') %}
        {% set start_time = state_attr('calendar.sonarr_calendar', 'start_time') %}
        {% set end_time = state_attr('calendar.sonarr_calendar', 'end_time') %}
        🎥 Episode Alert: {{ next_event }}
        Description: {{ description or "No description available." }}
        
        Start Time: {{ start_time or "N/A" }}
        
        End Time: {{ end_time or "N/A" }}
mode: single
Great! Next, complete checkout for full access to Automate It!.
Welcome back! You've successfully signed in.
You've successfully subscribed to Automate It!.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.