Local calendar option

The new calendar trigger is great! Means if I want to make a schedule for my hvac or my lights I can simply make a calendar. Put events when the lights/hvac/whatever should be on and make an automation that turns the thing on when an event starts and turns it off when an event ends on that calendar.

Unfortunately though HA’s OOTB calendar options all involve other services. You have to configure google calendar or something that supports caldav and then manage your schedule calendar in that other service. This makes it more difficult to set this up and likely creates a dependence on a cloud service for what should be a simple task.

I would like the ability to add and manage local calendars from the calendar panel in the HA UI. That way I can make simple schedule calendars from there and use them in automations. No other services required.

I’ve been thinking about this and i think its a good idea. The direction we’d want to take is described here input_timetable · Discussion #751 · home-assistant/architecture · GitHub – basically a local ical.

Existing google calendar supports adding events via service, and it could work similarly for a local calendar.

I personally use google calendar, but have been interested in maybe developing this just for completeness. I think there are a few existing python local calendar libraries out there we could use.

2 Likes

Yea I can’t really claim credit for the idea since I did read a lot of the discussion on that ADR a while back (I actually forgot where I had read it until you linked it so thanks for that lol). I was surprised there wasn’t an FR about it so I figured I’d make one.

But yea in this thread I was trying to advise a user how to simplify a very complicated automation for scheduling their hvac with the new calendar trigger feature and realized while the calendar trigger is perfect for this task it’s a bummer I have to tell them “set up google first”. A lot of users have google calendars so I’m sure that’s not a dealbreaker for many people but it would be great to have a fully local option.

1 Like

Yeah I saw that and agreed with your comment.

One thing I am working on is a local Google calendar sync to improve it’s reliability and efficiency for multiple calendar triggers, but do still agree many folks want pure local.

3 Likes

Couple of python caldav servers that look active, might be worth considering - radicale looks better supported. Probably simple to docker these for a hass.io addon but as a core user it would be nice if there was a core option

Yes please!!!
This just seems like it should be a fundamental part of Home Assistant, was very surprised it wasn’t.

2 Likes

Wow, yes please!
I just wanted to try calendar triggers and found myself asking “where the heck is the calendar?”.
It should really not exclusively rely on 3rd party services - especially not cloud ones - to create schedules for automations.

1 Like

Radicale is available as an add-on in the Ulrar repo

Great suggestion. A caldav add-on + caldav integration sounds like a lot simpler option than a new local calendar integration.

FWIW, there are a few caveats concerning the configuration of Ulrar’s Radicale add-on. It’s not quite as friction-free as other add-ons.

The htpasswd users file must be /share/radicale/users and passwords must be hashed in md5. Ingress does not work, but the web interface can be found on port 5232.

This would be excellent to have a LOCAL calendar integration for home automation recurring things, and also the ability to SHOW automations that are set to run at certain times during the days based on existing automations. I have a bunch of “daily” automations that it would be very nice to see what automations are coming up.

In addition, functionality should include recurrence settings in parity with google calendar (Repeat every X daily/weekly/monthly/yearly), even so far as repeat every 3rd Tuesday and Thursday of every 2 months. Things like that would provide IMMENSE value to HA from a scheduling/time-trigger automation perspective.

Bonus points if input_datetime driven triggers are dynamically set/change in the calendar.

1 Like

I used the Garbage Collection addon - https://github.com/bruxy70/Garbage-Collection

It’ll give you a local calendar of sorts, you put names with dates in your config and it creates sensors that give you countdowns to the next event. I use mine to populate a calendar card with birthdays and anniversaries and such.

What it doesn’t do is “first Tuesday of the month” or anything like that. Fixed dates only. Still, for something apparently originally written to remind you to take the trash out, it’s amazingly useful.

Would really love a “family appointments/reminders” calendar to act as a screen saver for my wall tablets. I already have code for a screensaver that is working really well, but would love to be able to show today’s events/appointments along with the pictures etc… Echo Show who?

3 Likes

Hi, I tried out Radicale in a container, and although it was very simple to setup and get running with HA, there is a long running request to implement the CalDAV standard for expanding recurring events- and as a result you will only see the first event in a recurring series in HA.

also maybe helpful list of caldav implementations with working expansion/other info: https://github.com/python-caldav/caldav/issues/157

DAViCal is in the main debian repo and seems like another good locally hostable choice, but at a glance has more management overhead(byo web server + db).

Yes please.

As I don’t want to use cloud/big tech solutions, I now use my NAS to host a calendar. But that means I have a open line to my NAS, which I don’t like (I normally only do backup/sync on demand) in relation with ransomeware.

Currently the simplest way is to run a local caldav server and use the caldav integration

I’ve started working on a local calendar integration:

Stay tuned

5 Likes

I’ve published the local calendar integration as custom component:

This does not yet include the frontend side of things, so you’ll have to use the service to create and delete events. If you are feeling brave, i’d love to hear folks feedback after trying it out even if the full UI isn’t there yet (it will display events, including recurring events, in the UI).

The storage is in an .ics in the .storage directory file if you want to poke at the innards.

7 Likes

That sounds great, any progress on a local sync option? I am using Google calendar and currently have issues with the calendar repeatedly becoming unavailable for some reason (see here: Google calendar repeatedly unavailable), a daily local sync would at least reduce the reliance on cloud services to always be available…

Hi, i also maintain the google calendar integration. I don’t think that issue is because of cloud vs local, but is really a configuration issue. I’ve left a reply on that thread with a suggestion, but either way even if its some other issue, just want to clarify that is not normal.