Look for a calendar event containing a specific string

I am looking for a way to find the next event that contains a specific string for a calendar that was shared with me, and appears in homeassistant through the google calendar integration.

The problem is, it seems, through the google calendar integration, it only shows information about the next event.

Aditionally, I can’t use ical as this calendar was shared with me (it is now my own) through google calendar.

I can try to use “Get events” but it has two issues:

  1. The first one is, that though it does return data, I don’t have the knowledge to process this data into a simple homeassistant sensor.
  2. The second one is, that even if I could process it into a sensor, I would have to run an automation on repeat constantly in order for homeassistant to keep checking and updating, as opposed to a sensor that updates automatically.

The exact usecase is:
My wife works the night shift on irregular days during the week.
I would like for the homeassistant dashboard to inform me of weather a “nightshift” event has been detected today, and when it is supposed to end.

At this point there are scores of threads covering this topic on this forum.

Example sensor configuration

@Didgeridrew The way I understood it from that thread, is that it only runs discretely once per day. Is there any way to have it run continously? Like any other template sensor?

Template sensors do not “run continuously”, they update when there are updates to the state object of entities they contain; or at the top of every minute if they aren’t based on entities.

You can use any trigger you want. Pick one (or multiple) that works for your situation. If you describe your needs and concerns, we can help you with that.

Okay I think I understand. The other template sensors I have made in the past automatically updated without a trigger, but that is because by default home assistant updates a template sensor when any referenced state within the sensor changes. Since for this sensor, there is no state that changes (we are actively querrying a calendar every time), there is no way to make it update automatically. I ended up setting it up with a time pattern trigger. Thanks @Didgeridrew !