CalDAV - Add support for travel time

On Mac/iOS Apple added a “Travel Time” option to calendar events. I believe this is synced to the CalDAV server and it looks like this:

X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT15M

This is a 15-minute travel time.

I’d love to have this in HA as it would mean I could set up an automation based on when I should leave for an event. This assumes there is a way to get this data into a trigger. I’m not very knowledgeable yet about HA’s calendar functions - I only use the “Calendar Trigger”. I think we’d use the same trigger, but then maybe trigger it both at the start of the event and also the travel start? In the calendar event data (trigger.calendar_event) we could check which triggered it? I’m not sure.

Use Case
My personal use case is to have HA check the temperature and start my car if I am going to be leaving. With Travel Time I’d be able to set it up to start the car 15 minutes before I leave. Right now I use a separate event to do this and it works great, but sometimes I forget to create the extra event.

There are lots of other uses for this though, reminders/alerts. Other prep for events - turn on/off lights, signaling, etc.

I don’t think HA should start catering for hacks Apple and others introduce, but it would generally be helpful if a calendar event could trigger something else earlier in time, then you could maybe hack this up yourself. Please see Per-calendar configurable lead time

Generally I’d probably agree with you - but a lot of things in HA are for working around differences between specific devices/services. Supporting this (Apple only? I’m actually not sure if others use it.) mod to CalDAV wouldn’t be much different IMO. Having said that, not many even use CalDAV so :man_shrugging:t3:

Be sure to vote on your own feature request too, I voted for it as well - it would be better than not having anything like this.

I’d still prefer my mod suggestion as it would be easier to implement in automations - I don’t think there is any easy way to get the raw data needed right now at all.

I agree, travel time from the apple calendar would be cool. As a work around I put my own travel time estimate into the calendar event description (which is already passed on to HA) and use that in the automation to start the car heater. No need for an extra “turn car heater on” event in your calendar then.

Nice! Could you share how you enter those in and parse them in the automation?