ICS Calendar platform

I’ve created a custom component that provides a new platform for calendar, to display calendars in ICS format. Because it’s just a platform the calendar component, you get a sensor which lists the current event, and lovelace interface cards (e.g. Calendar Card) can be used to display upcoming events, too.

See GitHub - franc6/ics_calendar: Provides an ICS (icalendar) platform for Home Assistant for more info.

Update: Version 2.0 is finally released. Please note this is a breaking change, you should uninstall whichever version you are using before installing this one. Additionally, if I’ve asked you to switch a 2.0.0 beta version to 1.0.x, you should pay attention to the section on parsers and the new parser option listed in README.md. Use “ics” if you switched to a 1.0.x version.


Add platform: ics to your HA configuration.
In the HA UI go to “Configuration” → “Integrations” click “+” and search for “ics”

ics will not show up for me in Integrations. I have manually installed multiple custom components, so I doubt that I did something wrong there (as all the other ones work fine). Might this be due to my configuration?

- platform: ics
      - name: "AWSH"
        url: "https://www.awsh.de/api_v2/collection_dates/1/ort/83/strasse/590/hausnummern/0/abfallarten/R02-B02-D02-P04-W0/kalender.ics"
        # optional
        # includeAllDay: true

I am running Home Assistant 0.96.2

arch 	x86_64
dev 	false
docker 	true
hassio 	false
os_name 	Linux
python_version 	3.7.4
timezone 	Europe/Berlin
version 	0.96.2
virtualenv 	false
mode 	storage
resources 	13
views 	8

Do you know what might be the problem here?

Yeah, the problem is the installation instructions. I forgot to update the instructions which were copied from a blueprint project. :frowning:

I’m updating the instructions now to remove the bit about integrations, as I’m pretty sure that wouldn’t work.

Anyway, given that configuration, you should see a new entity named calendar.AWSH, which you can display with one of the calendar cards in the lovelace UI, or query through the rest API.

Does it support any authentication protected .ics file, like in http://www.icalx.com ?

Not at this time, as I only needed unauthenticated access for iCalendar.

If that’s something you’re interested in having, and not just a question out of curiosity, let me know, and I’ll add it to my TODO list. Or, if you’re a programming type, please fork the github repository, and submit a pull request. I might not merge it, but for sure the feature will be implemented sooner. :slight_smile: (Hint: search for urlopen in calendar.py, and set it up to handle authentication; search for CONF_ to see how to add new configuration options to get the authentication info).

1 Like

Do you have any UI card example that show the next events?

No, but I highly recommend Calendar Card. See https://github.com/ljmerza/calendar-card for more information (including a screenshot). It’s the one I use with this component, and it works well to show upcoming events.

I know the card specifically references Google calendars, but there’s nothing special to make Calendar Card work – you just include the calendar(s) from this component in the entities configuration, just as you would for any other calendar. The card works with all calendar platforms in Home Assistant.

1 Like

My HA locks up and everything times out when I enable this component and query it with the calendar card. I don’t get any calendar related errors in the log though. Any ideas to troubleshoot this?

Which UI card are you using?

Do you see the same issue with other calendar types (e.g. caldav or google)? If yes to this question, I’d report the issue to the card developer, as it might be a problem with the card, not my component.

If you see problems only with my component and that card, then it’s probably my problem. :slight_smile:

There’s one other potential problem I can think of. Do you run under hassio or hassos? If so, did you specify a host name or IP address in the URL for the calendar? If a host name, it’s possible that the problem is with DNS. There’s another thread on here which discusses the DNS resolution problems with hassio, and how to fix them. I can probably find it, if that seems to be the trouble. Although, I’d expect you to see errors in the log if that were the case.

Anyway, once we have answers to those questions, if you’re willing to run test builds, I can enable some additional logging, and we might be able to determine what’s wrong, and if there are any changes I can make to improve things. I frequently see slow responses with the UI card I use and the caldav component, but then, I’m checking 13 calendars with it, so it hasn’t seemed unreasonable to me. :slight_smile:

It appears to be a specific ICS calendar feed. I can send you the ICS file and/or let’s do some additional logging.

I’m using calendar-card. Running Hass.io and using a hostname. Lot’s of integrations, but not likely DNS related as I query many hostnames without problems. I don’t have any other calendar types.

I got Google Calendars working great and have that same ICS feed available through that. So I’m good for now, but if you’d like to see what’s crashing it that would be nice.

It also only seems to crash when I add the calendar to the calendar feed card.

@franc6 i wonder if you can help me ?

I am getting the following error using this custom component;

state: off
attributes: offset_reached: false

Below is what is in my configuration file

  - platform: ics
        - name: 'Family Wall'
          url: 'http://api.familywall.com/ical/familymember/$secret$=Family'
          includeAllDay: true  

Anyone know what i am doing wrong ?

The ICS files opens up as expected in Outlook 2016 so i am assuming the URL is correct and working.

Thanks in advance


Where do you see that message? That looks like just the state and one of the attributes for the component. As long as the calendar doesn’t have any events during the time you see that, that’s even the correct state.

Please note I’ll be going out of town soon, so I might not be able to reply again before Jan 27.

@j0dan If you can go ahead and send me the specific calendar file, that’d be good. I probably won’t get to it until next week, but I am curious to learn what’s wrong. Just send me a private message, and I can provide contact details, if you don’t want to post it here.

@franc6 just sent you a private message.

Thanks in advance

@andrew.vint The ICS file you sent isn’t valid. Most (all) of the events include an alarm that isn’t specified correctly. Each VALARM should have both TRIGGER and ACTION, but the file only has TRIGGER.
What created the file? If it’s something popular, I might be able to get the author of the ics library I use to support this.
I’ll look into seeing what I can do to make parsing errors with the calendar obvious, too. It shouldn’t be too hard, but I won’t get to it until next week. Thanks for the report!

Came from the following app, wife uses it to keep all family things in once place

@franc6 dont know if you have done anything or my request for change to Family Wall themselves have fixed the problem but it appears to be working now. Thanks

@andrew.vint That was Family Wall. I had also contacted them about it. I’m glad they fixed it for you!

Same kind of issue andrew.vint here… as soon as I enable on calendars I have it seems to just use up all resources on PI… I tried a calendar that has less events and it does a little better