At present, overlapping events are not recognised as ‘current’ in Local Calendar.
By ‘overlapping’ I mean that a second event starts before the first one has finished, and by ‘recognised as current’ I mean the event whose details are returned from the calendar attributes…
{{ state_attr(<calendar entity_id>, 'message') }}
{{ state_attr(<calendar entity_id>, 'description') }}
{{ state_attr(<calendar entity_id>, 'start_time') }}
{{ state_attr(<calendar entity_id>, 'end_time') }}
(‘message’ is a weird name for the title or name of an event)
The event details are available in the trigger attributes, but only when the event start trigger fires
trigger.calendar_event.summary
trigger.calendar_event.description
trigger.calendar_event.start
trigger.calendar_event.end
(here ‘summary’ is the weird name for the title or name of an event)
When you read the calendar attributes, the ‘current’ event is (at release 2024.2.2) the one that started first. The second one only becomes current when the first one finishes. If the second one finishes before the first, it will not be seen at all with this method. The same applies to a third or more overlapping events.
To use overlapping events with the Local Calendar integration at present, one would have to read the trigger attributes from the event start trigger and push them onto a stack implemented in a custom file. Expired events would be removed from the stack and the current event would be the one remaining on top of the stack (if any). This is complex at best and beyond all but the most advanced HA programmer.
My feature request is simply to change the behaviour of the Local Calendar such that the current event is the one that started latest instead of earliest. Then, in my example, the second event would become current as soon as it starts, and the first event would become current again when the second event finished, if it has not already finished. This would apply to as many overlapping events as the calendar allows the overlapping events are treated as current in the order of latest start time.