📆 Calendar Notifications & Actions

Hi, first thank you for all your Work.

I have the same Issue, the Trigger never “fire”. I used HA Calender and tried like your Video, but i don’t find a mistake.

same here sadly

@Blacky thanks for this blueprint, it works great! I have one request: is it possible to add the possibility of choosing a custom notification icon?

1 Like

@Drgonz017

What video would that be as I have never made a video?

Blacky :grinning:

@f3d3

Where would this icon be?

Blacky :grinning:

It’s the notification status bar icon as per the docs Introduction | Home Assistant Companion Docs

It would be great if you could add support for it :grin:

It’s the same for me. I use another HACS integration called chore helper (Chore Helper - Track recurring or manual chores with flexible scheduling) which creates its own calendar with full day entries as well and I have the exact same problem that the start seems to be never triggered. And my automation is more than basic:

alias: Kalender Chore
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.chores
    include_calendar_trigger: disable_key_word
    include_start_notify: enable_start_notify_options
    start_notify_data:
      - sticky
      - high_priority
    start_notify_device:
      - 9544dc2deb9ccc0acb20338639131160
      - cf3099cc85bc3ea995a6e85d689e591a

Any chance that we can set up something like this as trigger:

trigger:
  - platform: state
    entity_id:
      - calendar.ferien
    to: "on"
    id: Anfang
  - platform: state
    entity_id:
      - calendar.ferien
    to: "off"
    id: Ende

Would maybe help.

@cptdaydreamer

Looks like they have a know issue. Have you taken this into account and maybe applied and offset?

“There is a known issue I haven’t resolved yet related to how bare dates show in the Home Assistant UI–they always appear a day early for some reason, even though the underlying value is correct and shows up right on the calendar. For example, the due date in the screenshot below is actually 4/10/2023, but it shows as the 9th within the attributes. I don’t know why this happens yet.”

Blacky :grinning:

There is not one single trace. So I think it is never triggered anyway or am I wrong? So I don’t even know how to debug this. As well when I only get the chance once a day…

@cptdaydreamer

Yeah, it is probably how they made the integration. I have worked of the official HA calendar.

Maybe you can replace the trigger in the blueprint to what you think it should be, like this.

triggers:
  - platform: state
    id: "t0"
    to: "on"
    entity_id: !input calendar
    offset: !input start_calendar_offset
    id: Anfang
  - platform: state
    id: "t1"
    to: "off"
    entity_id: !input calendar
    offset: !input end_calendar_offset
    id: Ende

Then it may work for you.

Blacky :grinning:

I now set a start_calendar_offset. I don’t know why it works then.

alias: Kalender Chore
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.chores
    include_calendar_trigger: disable_key_word
    include_start_notify: enable_start_notify_options
    start_notify_data:
      - sticky
      - high_priority
    start_notify_device:
      - 9544dc2deb9ccc0acb20338639131160
      - cf3099cc85bc3ea995a6e85d689e591a
    start_calendar_offset:
      hours: 6
      minutes: 12
      seconds: 0
      days: 0

What’s not good is that as I add a start_action_button the notification will not arrive on my phone anymore. Why?

alias: Kalender Chore
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.chores
    include_calendar_trigger: disable_key_word
    include_start_notify: enable_start_notify_options
    start_notify_data:
      - sticky
      - high_priority
    start_notify_device:
      - cf3099cc85bc3ea995a6e85d689e591a
    start_calendar_offset:
      hours: 6
      minutes: 38
      seconds: 0
      days: 0
    start_notify_interruption_level: active
    include_start_action_buttons:
      - enable_start_action_button_1
    start_action_button_1: Erledigt
    include_start_action_button_confirmation: enable_start_action_button_confirmation
    start_time_delay:
      hours: 12
      minutes: 0
      seconds: 0
    start_action_button_confirmation_title: "{{ trigger.calendar_event.summary }}"
    start_action_button_confirmation_message: Der Task wurde erledigt.
    start_time_delay_confirmation_message: Der Task wurde Ăźbersprungen, da die Zeit abgelaufen ist.
    start_action_1:
      - action: chore_helper.complete
        metadata: {}
        target:
          entity_id: >-
            {% set event_name = trigger.calendar_event.summary %} {% set
            found_entity = states | selectattr('name', 'equalto', event_name) |
            map(attribute='entity_id') | list %} {{ found_entity[0] if
            found_entity | length > 0 else 'none' }}
    start_action_button_stop_confirmation_message: Abbruch

@cptdaydreamer

So you got it working now… that is good. Just take note of the known issue in the integration your using. As my above post it is 24 hours out "is actually 4/10/2023, but it shows as the 9th within the attributes. "

This is because your have no text in the Start Notify - CANCEL Action Button

:warning: Enter the names for all enabled Action Buttons below, including the CANCEL Action Button. Missing any button names may prevent the automation from functioning correctly and could result in not receiving the notification.

Once you add the text “Stornieren” say to the Start Notify - CANCEL Action Button input you will receive the notification.

Blacky :grinning:

Thanks @Blacky for your help and Blueprint.
I’ve tried to get it running with a local ICS Calendar… but same - no trigger.
I’m giving up for now and will see if this may be a thing in the future :slight_smile:

1 Like

Thank you, it finally works for me. I will adjust your blueprint a bit for my case as I would like to have a non-swipeable notification in this case. So it needs to be permanent on Android. I will delete it in the action buttons.

And I want to change the icon and icon color (only possible on Android) to really see it is a task for me because it’s a task calendar. If I have changed it and it works do you want the result?

Okay wow I underestimated how big the blueprint is. Not sure if I’m able to change it so easily :')

@cptdaydreamer

Your welcome.

All good, I know how to do all the code and I would like to keep this post for the actual blueprint.

Blacky :grinning:

Hi I’m looking forward to implementing this – I added an all day event with the keyword #birthday# to my calendar and filled in the Blueprint to create the Caltest automation.

alias: Caltest
description: “”
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.my_cal
calendar_trigger: “#birthday#”
include_start_notify: disable_start_notify_options
start_notify_device:
start_notify_data:
- high_priority
I notice that when I do a manual run-actions of the automation the log shows:
2025-03-12 10:36:11.067 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: ‘dict object’ has no attribute ‘calendar_event’ when rendering ‘{{ trigger.calendar_event.summary }}’
2025-03-12 10:36:11.068 ERROR (MainThread) [homeassistant.components.automation.caltest] Error rendering variables: UndefinedError: ‘dict object’ has no attribute ‘calendar_event’
2025-03-12 10:38:07.842 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: ‘dict object’ has no attribute ‘calendar_event’ when rendering ‘{{ trigger.calendar_event.summary }}’
2025-03-12 10:38:07.842 ERROR (MainThread) [homeassistant.components.automation.caltest] Error rendering variables: UndefinedError: ‘dict object’ has no attribute ‘calendar_event’

@Iggy

You cannot do a manual run of the automation.

You also need to set up your notification correctly. You need to enable a start or end notification and set up your devices to be notified.

Blacky :grinning:

Thanks was that “you cannot” or “you can” do the manual run?

@Iggy

O sorry… you cannot use the manual run.

Blacky :grinning: