Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic is resolved. This helps other users find answers to similar questions.
For more information about the Solution tag, refer to guideline 21 in the FAQ.
Tip:
It’s the post that answers/solves the question/problem that is marked with the Solution tag. You marked your own post but it doesn’t contain information that explains why your automation failed to trigger.
I think I was too eager and when I was originally testing, it was a workday and the notification said it was a workday. Poor troubleshooting on my part, I should have waited.
I don’t think it’s reading today’s calendar_event.summary.
Basically, I’m trying to do the same thing here as this thread. I have a separate calendar that my wife uses for school (teacher.) There are 4 kinds of “days” she works. When those days are not present in the calendar, she isn’t working. All the morning automations should be turned off or other “vacation” automations should fire.
Her work days are “Red Day”, “Blue Day”, “CCR Day”, and “Purple Day”. These are all day events in the calendar.
How do I best do this automation? I see the link below has a relatable situation but am not sure how to proceed.
alias: Work day
description: ""
trigger:
- platform: calendar
event: start
offset: "0:0:0"
entity_id: calendar.rhs_sy22_23
condition:
- condition: template
value_template: >
{% set days = ['Red Day', 'Blue Day', 'Purple Day', 'CCR Day'] %}
{{ days | select('in', trigger.calendar_event.summary) | list | count > 0 }}
action:
- service: notify.persistent_notification
data:
message: "It's a workday."
mode: single
Are the scheduled events All Day events? Or are they events with start and stop times?
If they are All Day events, the trigger occurs at midnight (start of the new day) so you can’t add a Time Condition restricting the time for ‘after 05:00’ because then you won’t get a notification.
No notification. I’m wondering if it’s because it’s an Apple Calendar and not a Google Calendar? Should that even matter? It’s an iCal format and HA sees it.
Okay, I’ve added and will let you know tomorrow since this only triggers once.
Found this in the CalDAV documentation. Maybe why it’s not firing.
“ This example will generate default binary sensors for each calendar you have in your account. Those calendars will be on when there is an ongoing event and off if not. Events that last a whole day are ignored in those calendars. You have to setup custom calendars in order to take them into account or for advanced event filtering.”