Welcome to the community.
{{ trigger.calendar_event.summary }} and your text here
or
your text here {{ trigger.calendar_event.summary }}
or
your text here {{ trigger.calendar_event.summary }} and some more
Blacky ![]()
Welcome to the community.
{{ trigger.calendar_event.summary }} and your text here
or
your text here {{ trigger.calendar_event.summary }}
or
your text here {{ trigger.calendar_event.summary }} and some more
Blacky ![]()
Transform Your Calendar: Turn Events Into Notifications and Actions!
![]()
Maintenance
We updated the default title and message in the start & end inputs to
{{ trigger.calendar_event.get('summary', '') }}
{{ trigger.calendar_event.get('description', '') }}
Thanks to @stephanschleichstr13 for doing the testing ![]()
If you like this blueprint? Consider hitting the
button in the top post ![]()
If you like my blueprints, and would like to show your support or just say thank you? Click Here ![]()
Enjoy
Blacky ![]()
Feature request / patch: “Day Exclude Keyword(s)” (daily blocklist) for Calendar Notifications & Actions
I’m using the Calendar Notifications & Actions blueprint and needed a way to combine the existing keyword triggering with a daily blocklist.
Use case (real example):
Early Shift, Late Shift), but only if there is no all-day absence event on the same date (e.g. Vacation, Sick).What this patch adds:
Calendar Trigger - Day Exclude Keyword(s) (comma-separated, like the existing keyword list).calendar.get_events.Motivation:
This pattern is very common in work calendars (shifts + all-day vacation/absence). It also enables more advanced automations later (e.g., determining when an EV must be fully charged based on tomorrow’s shift, but skipping charging logic on vacation days).
Note: This patch/diff was AI-generated (with manual testing/iteration in Home Assistant) and may need minor style adjustments to match the upstream blueprint conventions.
diff --git a/calendar-notifications-and-actions.yaml b/calendar-notifications-and-actions_modified.yaml
--- a/calendar-notifications-and-actions.yaml
+++ b/calendar-notifications-and-actions_modified.yaml
@@ -146,15 +146,33 @@
calendar_trigger:
name: Calendar Trigger - Keyword(s)
description: >
If you selected **Include Keyword** or **Exclude Keyword** above then enter a single keyword, or a comma-separated list of keywords, to trigger this automation.
@@
default: []
selector:
text:
multiple: false
multiline: false
+ day_exclude_trigger:
+ name: Calendar Trigger - Day Exclude Keyword(s)
+ description: 'Optional: Comma-separated list of keywords that, if found in ANY event on the same day,
+ will block this automation from running. The keyword is checked in both the event summary and event
+ description.
+ '
+ default: []
+ selector:
+ text:
start_calendar_offset:
name: Calendar Start - Offset
description: >
You can specify an offset from the start of the calendar event for when the trigger should be activated.
To trigger the automation before the start of the event, use a negative sign "-" followed by the time value.
@@ -812,6 +830,7 @@
variables:
calendar: !input calendar
+ day_exclude_trigger: !input day_exclude_trigger
include_calendar_trigger: !input include_calendar_trigger
calendar_trigger: !input calendar_trigger
start_calendar_offset: !input start_calendar_offset
end_calendar_offset: !input end_calendar_offset
include_start_notify: !input include_start_notify
@@ -935,8 +954,43 @@
- condition: and
conditions: !input global_conditions
action:
+- variables:
+ _trigger_start_raw: "{{ trigger.calendar_event.start }}"
+ _day_start: "{{ as_datetime(_trigger_start_raw).strftime('%Y-%m-%d 00:00:00') }}"
+ _day_end: "{{ (as_datetime(_trigger_start_raw) + timedelta(days=1)).strftime('%Y-%m-%d 00:00:00') }}"
+
+- choose:
+ - alias: "Day exclude keywords present -> stop"
+ conditions:
+ - condition: template
+ value_template: "{{ (day_exclude_trigger or '') | string | trim != '' }}"
+ sequence:
+ - action: calendar.get_events
+ target:
+ entity_id: !input calendar
+ data:
+ start_date_time: "{{ _day_start }}"
+ end_date_time: "{{ _day_end }}"
+ response_variable: _day_agenda
+
+ - variables:
+ _exclude_keywords: >
+ {% set s = (day_exclude_trigger or '') | string %}
+ {{ s.split(',') | map('trim') | reject('equalto','') | list }}
+ _day_events: "{{ _day_agenda[calendar]['events'] if _day_agenda is mapping and calendar in _day_agenda else [] }}"
+ _haystack: >-
+ {% set ns = namespace(text='') %}
+ {% for ev in _day_events %}
+ {% set ns.text = ns.text ~ (ev.get('summary','') ~ ev.get('description','')) %}
+ {% endfor %}
+ {{ ns.text }}
+ _blocked: "{{ _exclude_keywords | select('in', _haystack) | list | count > 0 }}"
+
+ - choose:
+ - conditions:
+ - condition: template
+ value_template: "{{ _blocked }}"
+ sequence:
+ - stop: "Blocked by day exclude keyword(s) found in calendar events for this day."
+
- choose:
- alias: "Start trigger"
conditions:
- condition: trigger
id: 't0'
sequence:
Thank you for your consideration
i tried this with another LLM a few months ago and it did not work. this aproach works fine
I just wanted to thank you. This is what I was looking for. I am using this BP to warn me in advance someone’s birthday is coming. Just wanted to ask - is it possible to trigger the notificatiion when ALL keywords are found? For example - when calendar even contains “Kate” and “birthday” - set the trigger for notification “Kate’s birthday is coming!”. I have more people’s birthday in calendar, but only few of them I want to be notified of.
Your welcome, glad you like it.
You will then need to set the keyword you would like to use for the ones you would like to be notified. Maybe you add something like this @birthdaynotification
Blacky ![]()
Hey there, I have an issue with this blueprint. The action won’t trigger, when an event for a whole day is present. Time based events work.
alias: Calendar Action Vacation
description: ""
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.familienkalender
calendar_trigger: "@vacation-erik"
start_calendar_offset:
hours: 0
minutes: 0
seconds: 0
days: 0
end_calendar_offset:
hours: 0
minutes: 0
seconds: 0
days: 0
include_start_notify: enable_start_notify_options
start_notify_device:
- e00a6c56d1c0f26198089c64eafd5e62
include_start_auto_actions:
- enable_start_action_1
start_action_1:
- action: input_boolean.turn_on
metadata: {}
target:
entity_id: input_boolean.urlaub
data: {}
include_end_auto_actions:
- enable_end_action_1
end_action_1:
- action: input_boolean.turn_off
metadata: {}
target:
entity_id: input_boolean.urlaub
data: {}
include_end_notify: enable_end_notify_options
end_notify_device:
- e00a6c56d1c0f26198089c64eafd5e62
We know the settings work as you said it works with time based events. All day events start from 12am on the day to 12am next day . The start will trigger at 12am and the end will trigger at 12am next day. You have two offsets you can use to shift when the automation will be triggered. Example if you set a Calendar Start - Offset of 8 hours then it will trigger on the day of the event at 8am. If you set the offset to -8 hours it will trigger the day before the event at 4pm.
I will run a test with your settings to confirm.
Blacky ![]()
Hi everyone,
I have an automation set up for my trash cans and I’m receiving the notifications, but I don’t see a “Cancel” button.
> alias: Müllbenachrichtigung
> description: ""
> use_blueprint:
> path: Blackshome/calendar-notifications-and-actions.yaml
> input:
> calendar: >-
> calendar.waste_collection_schedule_abfallwirtschaftsbetrieb_landkreis_ahrweiler
> include_calendar_trigger: disable_key_word
> start_notify_device:
> - 75ce7d7b332cf6d6172c244831a028d8
> start_calendar_offset:
> hours: 9
> minutes: 0
> seconds: 0
> days: 0
> include_start_notify: enable_start_notify_options
> start_notify_tag: Müll
> start_title: "{{ trigger.calendar_event.summary }}"
> start_message: Müll raus stellen!
> start_notify_data:
> - high_priority
> - channel
> - icon
> start_notify_channel: Müll
> start_notify_icon: mdi:trash-can
> start_action_button_stop: Müll ist raus!
> start_time_delay_confirmation_message: Nicht vergessen den Müll raus zu stellen!
> start_action_button_stop_confirmation_message: Müll ist rausgestellt!
> start_action_button_confirmation_title: Hast du nicht was vergessen?
Can anyone tell me what might be causing this?
I’m using Android.
Thank y
Hi.
How do I show the event start time in the reminder? Tried a few things and a bit of copilot but no look. Reminders work otherwise but the time would be really helpful. Thanks
The Home Assistant web site is a good resource of examples and because it written by Home Assistant we know it works. Click Here to see the calendar information They show you an Example: Calendar event notification
{{ trigger.calendar_event.start }}
or if you get a bit more advance in the time. The example below will give you 06:30 AM
{{ as_timestamp(trigger.calendar_event.start) | timestamp_custom('%I:%M %p') }}
so it would be
What you would like to say here {{ as_timestamp(trigger.calendar_event.start) | timestamp_custom('%I:%M %p') }} followed by anything else you like to say here.
and these are the time formats
| Format | Example | Meaning |
|---|---|---|
| %H | 18 | Hour (24-hour, 00-23) |
| %I | 06 | Hour (12-hour, 01-12) |
| %M | 30 | Minutes |
| %S | 45 | Seconds |
| %p | AM | AM / PM |
You can also get / find all the formats click here
Blacky ![]()