Check a day in the calendar instead of the next event

Getting inspiration from this video Make Home Assistant Smarter with the Google Calendar Integration, I have created an automation that checks my work agenda at 4 AM to see if I have to work. We use an automatic planner, so the text in my agenda is very standard and always the same (like ‘Loc Arnhem’, ‘Loc Zevenaar’, and if I don’t have to work it says something like ‘parttime’, ‘vakantie’,…). If the automation found out that I have to work, it enables another automation that starts up my morning routine, alarm,… Today is a sunday and I got woken up too early, which has caused me a headache, finding out WHY!

I think now that the automation checks the agenda and then uses the first entry it encounters, but that is TOMORROW. Not today. Today is empty.

My question is, how can I tell the automation only to check today in the agenda, and ignore future references? It is also OK to do nothing if it encounters an empty day, but that is more difficult to do I think?

(my automation checks at 4 in the morning and turns the alarm on. After 4 hours the automation turns the alarm off again).

Thank you for your help inadvance.