Calendar.get_events - All day

Hi.
I’m trying to get events from a Google Calendar with the native HA integration (Google Calendar - Home Assistant).
The example is: considering this is my daughter’s calendar, the school vacation started, for instance, Dec 31st and will finish in Jan 31st. Based on that, today is vacation.
The script to check the events for today I execute:

  start_date_time: "2025-01-16 00:00:00"
  end_date_time: "2025-01-16 23:59:59"

The issue is because of the vacation started before than the start_date_time and will end after the end_date_time, but there is still a event for today (and all days between the start and the end).
How could I check the events for today, including those events started some days before today and will finish after today?
Thanks a lot.

Your end date is in January 2024… fix that and you should get the desired results from the action. For a more dynamic script you will likely want to use a couple templates:

action: calendar.get_events
target:
  entity_id:
    - calendar.school
data:
  start_date_time: "{{ today_at('00:00:00') }}"
  end_date_time: "{{ today_at('23:59:59') }}"
response_variable: agenda

It was a mistake when I typed the year… even with 2025 the issue is the same, because end_date_time is after the defined one.
The problem remains the same (disregard the typing confusion).

Does it make any difference if you use duration rather than start/end?

    - service: calendar.get_events
      target:
        entity_id: calendar.school
      data:
        duration:
          hours: "{{ 24 - now().strftime('%H') | float(0) }}"
      response_variable: agenda

Interesting… I was working with:

response_variable: service_result

And it returned incorrect result. Changing it to “agenda”, it worked.
Thanks a lot.