Hi all,
I’m quite new to Home Assistant but loving it so far and getting addicted.
I would like to set up an automation to wake me up 60 minutes before my first meeting of the day, which can vary depending on my work schedule.
I was looking at how to set up a template binary sensor to trigger, and and was going to use templating to try and get the first event of the day. However, it seems I cannot get events through the jinja templating. I seem to only be able to get the ‘current’ entry. I may be able to get this to work in my case, but it seems like quite a functionality gap to not be able to iterate over for example current day events. Is there any way?
I see that the frontend components query the API: api/calendars/<calendar.name>?start=...&end=...
I was expecting to be able to do something like (just as an example showing the point of iterating on events):
{% set starttime = null %}
{% for event in calendar.<name>.events %}
{% if !starttime or event.start_time < starttime %}
{% set starttime = event.start_time %}
{% endif %}
{% endif %}
{{ starttime }}
Thanks in advance!