How to add an event to Calendar tomorrow at defined hour

Hello, I’m really new to HA and wondering how I can create an automation to create a Calendar event and schedule the event “tomorrow” at a certain hour (I.e. 2:00pm).
Thanks

You can use a template in the service call. What will be the source for the time input and what format will it be in?

Thanks. I just want to reschedule a calendar event to the following day at a given hour (I.e. 2:00pm) if a condition are met…,

Will the original calendar event be the trigger for the automation?

Yes, the original calendar event will be the trigger

The basic service call with templates would be something like the following,

service: calendar.create_event
data:
  summary: 'Example Event'
  start_date_time: "{{today_at('14:00') + timedelta(days= 1)}}"
  end_date_time: "{{today_at('15:00') + timedelta(days= 1)}}"
target:
  entity_id: calendar.example

Many thanks! It worked perfectly!

1 Like

Hi,

Any suggestion how I can tweak your example so it creates an event ‘today @ 16:00’ and run until ‘tomorrow @ 08:00’

For context I plan to run a simple automation on button press run automation to add entry to calendar for when kids stay over (they have flexibility which parent they want to stay). I can then use this as an additional conditional in automations that I have setup already for the kids.

service: calendar.create_event
data:
  summary: 'Example Event'
  start_date_time: "{{ today_at('16:00') }}"
  end_date_time: "{{ today_at('08:00') + timedelta(days= 1)}}"
target:
  entity_id: calendar.example
1 Like

I see it now (code structure)…

so you would always use the {{today_at… and then use the timedelata to offset it which way you want