The problem still persists, only using full day events, though.
Calendar log if the event has a fix start and end time:
2023-03-17 19:15:45.074 INFO (MainThread) [homeassistant.setup] Setting up calendar
2023-03-17 19:15:45.077 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2023-03-17 19:15:45.233 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.caldav
2023-03-17 19:15:45.696 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.waste_collection_schedule
2023-03-17 19:15:59.517 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 18:20:59.517065+00:00, 2023-03-17 18:36:00.517065+00:00 (offset=-1 day, 23:55:00)
2023-03-17 19:15:59.517 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 18:20:59.517816+00:00, 2023-03-17 18:36:00.517816+00:00 (offset=-1 day, 23:55:00)
2023-03-17 19:15:59.520 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 18:10:59.519928+00:00, 2023-03-17 18:26:00.519928+00:00 (offset=0:05:00)
2023-03-17 19:15:59.520 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 18:10:59.520504+00:00, 2023-03-17 18:26:00.520504+00:00 (offset=0:05:00)
2023-03-17 19:15:59.864 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list [(datetime.datetime(2023, 3, 17, 19, 40, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), CalendarEvent(start=datetime.datetime(2023, 3, 17, 19, 30, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), end=datetime.datetime(2023, 3, 17, 19, 45, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None))]
2023-03-17 19:15:59.865 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Scheduled alarm for 2023-03-17 19:40:00+01:00
2023-03-17 19:15:59.930 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list [(datetime.datetime(2023, 3, 17, 19, 25, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), CalendarEvent(start=datetime.datetime(2023, 3, 17, 19, 30, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), end=datetime.datetime(2023, 3, 17, 19, 45, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None))]
2023-03-17 19:15:59.930 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Scheduled alarm for 2023-03-17 19:25:00+01:00
2023-03-17 19:15:59.942 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list []
2023-03-17 19:15:59.983 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list []
Automation for it, all do trigger:
alias: Calendar Test
description: ""
trigger:
- platform: calendar
event: start
offset: "-0:5:0"
entity_id: calendar.test_calendar
- platform: calendar
event: end
offset: "-0:5:0"
entity_id: calendar.test_calendar
- platform: calendar
event: start
offset: "0:5:0"
entity_id: calendar.test_calendar
- platform: calendar
event: end
offset: "0:5:0"
entity_id: calendar.test_calendar
condition:
- condition: state
entity_id: calendar.test_calendar
attribute: message
state: Test1
action:
- device_id: xxx
domain: mobile_app
type: notify
message: Test
title: Test
mode: queued
max: 10
Calendar log if the event is all day (I added 3 all day event at 16/03/23, 17/03/23 and 18/03/23 to test for triggers:
2023-03-17 21:26:48.674 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.caldav
2023-03-17 21:26:48.825 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.waste_collection_schedule
2023-03-17 21:27:03.744 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 22:42:03.744203+00:00, 2023-03-17 22:57:04.744203+00:00 (offset=-1 day, 21:45:00)
2023-03-17 21:27:03.744 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-16 22:37:03.744887+00:00, 2023-03-16 22:52:04.744887+00:00 (offset=21:50:00)
2023-03-17 21:27:03.745 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-17 22:32:03.745453+00:00, 2023-03-17 22:47:04.745453+00:00 (offset=-1 day, 21:55:00)
2023-03-17 21:27:03.746 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Fetching events between 2023-03-16 22:27:03.746004+00:00, 2023-03-16 22:42:04.746004+00:00 (offset=22:00:00)
2023-03-17 21:27:04.118 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list []
2023-03-17 21:27:04.477 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list []
2023-03-17 21:27:04.483 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list [(datetime.datetime(2023, 3, 17, 22, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), CalendarEvent(start=datetime.date(2023, 3, 16), end=datetime.date(2023, 3, 17), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None))]
2023-03-17 21:27:04.484 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Scheduled alarm for 2023-03-17 22:00:00+01:00
2023-03-17 21:27:04.500 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Populated event list [(datetime.datetime(2023, 3, 17, 21, 55, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')), CalendarEvent(start=datetime.date(2023, 3, 17), end=datetime.date(2023, 3, 18), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None))]
2023-03-17 21:27:04.501 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Scheduled alarm for 2023-03-17 21:55:00+01:00
trigger:
2023-03-17 21:55:00.005 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Calendar event @ 2023-03-17 20:55:00+00:00
2023-03-17 21:55:00.006 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Event: CalendarEvent(start=datetime.date(2023, 3, 17), end=datetime.date(2023, 3, 18), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None)
2023-03-17 21:55:00.018 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Calendar event @ 2023-03-17 20:55:00+00:00
2023-03-17 21:55:00.019 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Event: CalendarEvent(start=datetime.date(2023, 3, 17), end=datetime.date(2023, 3, 18), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None)
2023-03-17 22:00:00.012 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Calendar event @ 2023-03-17 21:00:00+00:00
2023-03-17 22:00:00.013 DEBUG (MainThread) [homeassistant.components.calendar.trigger] Event: CalendarEvent(start=datetime.date(2023, 3, 16), end=datetime.date(2023, 3, 17), summary='Test1', description=None, location=None, uid=None, recurrence_id=None, rrule=None)
Automation used to trigger at 21:45, 21:50, 21:55 and 22:00 UTC+01:
alias: Test
description: ""
trigger:
- platform: calendar
event: start
offset: "-2:15:0"
entity_id: calendar.test_calendar
- platform: calendar
event: start
offset: "21:50:0"
entity_id: calendar.test_calendar
- platform: calendar
event: end
offset: "-2:5:0"
entity_id: calendar.test_calendar
- platform: calendar
event: end
offset: "22:0:0"
entity_id: calendar.test_calendar
condition:
- condition: state
entity_id: calendar.test_calendar
attribute: message
state: Test1
action:
- device_id: xxxxxxx
domain: mobile_app
type: notify
message: Test
title: Test
mode: queued
max: 10
As the logs stated, only 21:55 and 22:00 worked.