Hi, I would like to show upcomming and active calendar appointments on my lovelace dashboard.
I tried custom:atomic-calendar-revive, but the hideFinishedEvent: true does not seem to work. So I tried to make a template sensor myself omitting all-day events
But how do I also omit events where end<now() → ???
No, with start_date_time set to use now() the calendar.get_events service will return all events that are currently active or that start at any time up to the end of the observaed time span, as defined by the duration or end_date_time variable.
I meant the parameter name itself is a bit misleading. I naturally understood that start_date_time meant when the event starts, not whether it’s active up till the current time. It’s the “start” part that’s misleading.
I haven’t yet looked at the related docs so can’t really comment whether they explain this clearly or not. If this isn’t clear in the docs, maybe a change to clarify this would be a good idea.
Happy to send an edit myself if you could shoot me a link to the docs, but would rather run it by you first given I’m not very familiar with Calendar.
The start_date_time is the start of the period you want to check on (it defaults to now(), so you could just remove it, and only provide end_start_time or duration.
The service calls returns all events which are active in the period, so that will include all events which either start or end in that period, and not necessarily totally fall in the period set.