An alarm clock adjusting to Magister iCAL calendar

@Emphyrio I have a specific request. My son has an exemption for a certain subject (“BC”) at school, but that subject is scheduled as first lesson on Tuesday’s — and that’s what the alarm is based on.

Is it possible to adjust/extend the template sensor so that when the first lesson is “BC,” the nextup_lesson sensor ignores that and uses the next lesson after that on that day as the output of the nextup_lesson?

For example, I could add this line in the template sensor:

| rejectattr('attributes.summary', 'search', 'BC')

Or do you suggest another way?