Creating a Google Calendar Appointment based off current time with an offset Hi

Hi

I’m trying to create a Google Calendar Appointment based off current time with an offset… So far I have got the following:

action:
  - service: google.create_event
    data:
      summary: Test
      start_date_time: "{{ states('sensor.date')}} {{ states('sensor.time')}}"
      end_date_time: "{{ states('sensor.date')}} {{ states('sensor.time')}}"
    target:
      entity_id: gmail_com

This creates a calendar entry that starts and stops at the time the script runs.

I’d like to add +30 minutes to the start time, and +60 minutes to the end time, thus getting a calendar entry that starts 30 minutes from the point the script runs with a duration of 30 minutes.

Thanks in advance for the help.

Seems I was looking in the wrong place… as “now()” can be used to grab the time instead, and that is compatible with “timedelta” I can therefor do this instead:

service: google.create_event
data:
  summary: Test
  start_date_time: "{{ now() + timedelta(minutes = 30)}}"
  end_date_time: "{{ now() + timedelta(minutes = 60)}}"
target:
  entity_id: gmail_com

Which works perfectly :slight_smile: