Local_calendar ics file import option

A two question here =)

  1. do you reload calendar (via dev service console) after replacement file?
  2. r u sure what your calendar is OK? Yep, a strange question but alas. Can you upload your calendar for example to google or for example again to this service click (not ads! sorry for link)?

thank you @10der for explaining this.

but honestly… why is there no simple import button?! is almost unbelievable

Hi, local calendar developer here. It just needs to be designed and added. Keep in mind this is done in volunteer time, so someone has to be motivated to do this.

I personally don’t have a use case for this so I haven’t done it myself yet, but it’s been on the bark burner " Todo list" for awhile. (I put time on Todo lists instead)

4 Likes

Sir, hi
First of thank you :wink:
Second, thank u a very much for this component :wink:
And last. My IMHO one feature is absent: can’t able to setup RRULE :frowning:

Hi, thanks!

Can you elaborate? Rrules are supported. Maybe you mean via service calls is a gap? Yeah that’s true, only supported in the UI right now.

yep! Lack of calling API.

I searched for a similar thing.
Once a year we get a new trash day calendar via a PDF file from a company that is taking the trash.
Then I must manually add all entries to 5 calendars (mix, plastic, glass, paper, bio).
Ideally, I’d like to enter those days in a csv file and import them via a service call.

Ideally, I need two services:

  • clear all events from a given calendar for a given time
  • bulk import/insert events to a given calendar

This way I could import all the events, clear the entire year, and reimport events (when I make a mistake or the company sends an update).

You can sort of already do this.
When you create a local calendar, it stores the data in an ics file, in the .storage directory.

You would have to convert your events to ICS, but you can add them to that ics file, reload the calendar integration, et voila – calendar events.

a quick google suggets there are plenty of csv → ics tools around, which would make it easier than manually curating those events.

if you can write a script it would be pretty easy to put something together that does it for you.

FYI: with (some) pdf viewers you can select the information and paste that for example in excel (or any other spreadsheet program) which in turn might make the process easier to get your trash dates into a calendar.

I guess I have to write a pull request for the documentation but I have implemented this feature and submitted a pull request here, in case any of you wants to review my code:

Testing and feedback is much appreciated

2 Likes

Sadly the PDF files that we get don’t look too good.
https://zgk.zlotow.pl/pliki/upload/H%20ZAM%20X%2024%20-%20III%2025/2024-%20gm-%20Zakrzewo%202.pdf for the last 3 months of this year
https://zgk.zlotow.pl/pliki/upload/H%20ZAM%20X%2024%20-%20III%2025/2025-%20gm-%20Zakrzewo%202%20.pdf for first 3 months of next year

I’ve contacted the company multiple times and finally, they replied that this is the only format they provide and won’t share any other format.

That’s a pity.

I was just trying to help/inspire to prevent monkey work which is so not 21st century.
Over here, we get an ics file which I import in my mail program and from there synchronize with Nextcloud which is integrated in HA.

Lucky you :slight_smile:
I’m happy that my local company isn’t sending telegrams :rofl:
I’ve tried several times, and I’ve sent emails to every address I could find. I even offered to create API for them, but all I got was the answer ā€œNo, because noā€.

Thankfully the PDF has a table with the same structure, so I was able to create a parser.
Now, I must wait for Add read-only calendar from url by zeehio Ā· Pull Request #126862 Ā· home-assistant/core Ā· GitHub, to have a fully working automated calendar.

Hello everyone,

does anyone know how to delete ICS calendars imported into the local calendar?

In other words, I have the problem that I have an imported ICS calendar that cannot be found as local_calendar.xyz.ics in the .storage directory.

UPDATE: Found out for myself. The affected calendar comes from the custom integration Waste Collection Schedule. I was just no longer aware of it.

Maybe the new update has delivered:
lokaler_Kalender_40%

So long
Pc

1 Like

Unfortunately this will create a new calendar, not importing into an existing one.

ok.
AND :
If you only use the local calendar for garbage collection - you can create multiple local calendars - then that’s brilliant, because you don’t have to delete (and dispose of) the previous year’s data. Simply delete the old local calendar… and (let) create the new one.

so long
Pc

1 Like