šŸ“† Calendar Notifications & Actions

Thanks for Your quick reply. While creating event are two items. Summary and description. I test keyword in summary or both. The words were always identical. I tried different variants, but it works only without keyword. Now i tried new event with word Ahoj.
image

image

alias: Test kalendĆ”Å™
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.tomas
    calendar_trigger: "@Ahoj"
    start_notify_device:
      - 7ae6e56f635c16314b1da300e61024ec
    include_start_action_buttons: []
    include_start_notify: enable_start_notify_options
    include_end_notify: enable_end_notify_options
    end_notify_device:
      - 7ae6e56f635c16314b1da300e61024ec
    include_calendar_trigger: enable_key_word

You missed the @ symbol add this to your decription @Ahoj ā€¦ It is like a password that links your calendar event to the automation. I call it key word. :wink:

Let us know how you go.

Blacky :smiley:

Thanks. Now it working. But originaly i tried complet without @ (in calendar and automation) and it didnā€™t work. Is @ required?

No, you can use any word but it is a good idea to use a word that your not ever going to be used to describe something in a normal sentence, so adding @ or # or $ etc into a key word is a good way of doing this :wink:

Glad you got it up and going.

Blacky :smiley:

Iā€™m sure I missed it, but are there any options for custom notifiers? I use a script to handle all notifications.

Great project by the way, Thank You.

@ServiceXp

Yep, just use the start or end auto action options. You have 3 of each you can use. Then in your action select call service / scripts: Turn on and select your script.

@samuelthng has a realy nice blueprint for a script notification with a lot of options. He is very active and supports his blueprint to date. Click Here if you would like to check it out.

Hope this helps you.

Blacky :grinning:

2 Likes

Thank you for taking my suggestions to heart! You are an amazing BP author! Donated!

Fantastic Reply (ā€˜Pictures are my favoriteā€™) :grin: ! Thank You.

@DuckDuck25

Your welcome, and thanks for donating, this realy helps keep my blueprint alive :wink:.

Blacky :smiley:

@ServiceXp

Your welcome, glad you like it.

Blacky :smiley:

Thanks for Your help.

1 Like

Thanks for this great blueprint :clap:
Just little feature request which I added to your code

1 Like

@Blacky was kind enough to send me detailled instructions as I am not the worldā€™s best programmer (in fact very far from it :slight_smile: ), I noticed that he uses all day events and I had been looking for time-specific events as triggers.
.
I have been using my own construction based on all-day events, so I am not sure that I need this blueprint.
.
This is my own construction:
I created 20 sub-calendars in my Google Calendar: several with different wake-up times (6:30 am, 8 am and one that I named wake-up once), cleaning lady day, club meeting, trips etc.
.
On the days that I want HA to trigger an automation, in my Google Calendar I create an all-day event with the specific sub-calendar. Example: I have a Friday weekly all-day event named Susan with sub calendar cleaning lady. It happens that she asks to change the day and then for that week I move he event to, letā€™s say, Thursday.
.
My wifeā€™s work is almost always Monday to Friday, so her wake-up event is entered accordingly in the Google Calendar, with the specific sub-calendar. I have a reminder in the Google Calendar on the weekend to make any changes needed for the following week. As an example, next week Monday is a holiday, so I need to delete her wake-up entry for that day.
.
All these calendars show up as entities in HA.
.
For the wake-up automations I first created 2 scripts, one for my wifeā€™s wake-up (lights on, curtains open, Alexa announcements) and one for myself (as I usually get up earlier, only blue lights so as not to wake up my wife).
As there are different wake-up automations, I do not need to repeat the actions and just use one of the scripts.
.
As trigger I select one of the calendars, letā€™s use the example of wake-up SB 6:30 am:


As these are all-day events, meaning the event starts at midnight, I entered 6:30 off-set (after).
.
For action I use the relevant script that I created earlier.
.
Because we sometimes wake up at a non-regular time, I also have a calendar wake-up once and for that I will have to set the off-set every time it is needed, but I can use the existing script.
.
For other calendars, like cleaning lady day and trips I do not need a script and have specific actions for each.
.
I am not, in the slightest, claiming that my construction is better than @Blacky 's. In fact, his Blueprint is way more sophisticated and detailled. But with the use of all-day events, my construction works for me and is an alternative.

@EndUser

You donā€™t have to use all day events you can just set a time with no offset and it will trigger on time. I see you have also PM me so I will reply to you there.

Blacky :smiley:

1 Like

Hey @Blacky first of all great work on that bluieprint. It is awesome and works perfectly with Google Calendar.

I hope you can help me refine my setup. I use a calendar for the pickup of the waste bins (calendar is prepared by our municipality and i just import it into Google Calendar once a year).

I got everything working fine and receive a notoficatipon one day before pickup at 4pm. Great.

Now they include the info about which of the bins is to be picked up in the ā€œmessage attributeā€ like this:

message: Bioabfall
all_day: true
start_time: 2024-01-17 00:00:00
end_time: 2024-01-18 00:00:00

How can I get this ā€œmessageā€ into my notification? I tried this in the ā€œStart Notify Messageā€ but it does not work:

Morgen wird {{ trigger.calendar_event.message }} abgeholt

Thanks
Rick

@rickgardner077

Hi Rick,

I donā€™t use google calendar so I canā€™t test or see what is going on but you could try this

{{ trigger.event.data.summary }}

or

{{ trigger.event.data.description }}

EDIT: These are the HA calendar triggers you can use Click Here. If someone has found the way to add your data from a Google Calendar into the message then please jump in and let us know.

Let us know if this works.

Blacky :smiley:

I have a simple solution for you.
In your Google Calendar, create another calendar Abfall (Garbage Pickup in my example)

(*)

and then that calendar will automatically show up in HA (afer 15 minutes or after a reload of the Google Calendar Integration).
When you upload that yearly garbage schedule, do that in the Garbage Pickup calendar as a all-day event, and voila !! Now you can create the desired automation with the Garbage Pickup calendar as trigger, using the appropriate time offset.

(*) In this example Casa Aventura is the Google Calendar used for the HA Integration and the Garbage Pickup calendar is basically a sub-calendar that will show automatically in HA.

hi blacky,

First of all, thank you very much for your blueprints. - they help people like me a lot who arenā€™t quite good at juggling code yet.

I am currently using the blueprint for my garbage collection. - Now that Iā€™ve finally figured out where to find the action buttons, the whole thing is a bit too fiddly for me. At least it often happens to me that the whole notification is gone. Unfortunately, from this moment on, Iā€™m stuck in an automation process that I can no longer complete in a meaningful way.

alias: MĆ¼llerinnerung
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.mullabfuhr
    calendar_trigger: RestmĆ¼ll
    start_calendar_offset:
      hours: -8
      minutes: 0
      seconds: 0
      days: 0
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - d0a474exxxx709f02091axxxa339bbe0
      - 31a9561xxxx26464a7xxx9a3bf9c6d37
    start_message: Bitte die schwarze MĆ¼lltonne an die StraƟe bringen.
    start_title: "MĆ¼llmann sagt:"
    include_start_action_buttons:
      - enable_start_action_button_2
    start_action_button_2: Erledigt!
    start_time_delay:
      hours: 3
      minutes: 0
      seconds: 0
    include_start_action_button_confirmation: enable_start_action_button_confirmation
    start_action_button_confirmation_title: "MĆ¼llmann sagt:"
    start_action_button_confirmation_message: MĆ¼lltonne steht an der StraƟe.
    start_time_delay_confirmation_message: MĆ¼lltonne muss noch immer an die StraƟe!
    include_start_auto_actions:
      - enable_start_action_1
    start_action_1:
      - repeat:
          sequence:
            - service: tts.cloud_say
              metadata: {}
              data:
                cache: false
                entity_id: media_player.flur_homepod
                message: Bitte die schwarze Tonne an die StraƟe stellen!
                language: de-DE
            - delay:
                hours: 0
                minutes: 30
                seconds: 0
                milliseconds: 0
          until:
            - condition: state
              state: "on"
              entity_id: input_boolean.mull_restmull_an_der_strasse
    start_action_2:
      - service: input_boolean.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: input_boolean.mull_restmull_an_der_strasse
    include_end_notify: disable_end_notify_options
    include_end_action_buttons: []
    end_time_delay:
      hours: 0
      minutes: 0
      seconds: 0
    include_end_auto_actions:
      - enable_end_action_1
    end_action_1:
      - service: input_boolean.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: input_boolean.restmull_morgen

So I trigger 8 hours before the calendar event and notify myself and my friends on my cell phone first. If one of the two of us uses the button to indicate that he has taken the bin to the street, everything is done.

If this doesnā€™t happen, after three hours the HomePod should ask the hallway to take the bin out to the street every 30 minutes. - and that until that happened.

So I canā€™t choose any auto action because I want to keep annoying myself until the garbage can is actually on the street.
But if I have lost or closed the notification, what is the most user-friendly alternative to the action button? Is it possible to use an input_bool as an alternative? That could be ā€œeverythingā€ without me even having to pick up my cell phone when the HomePod and my wife are screaming at me.

In the future, I can also imagine that the ā€œBin at the streetā€ entity will be switched, for example, by a device tracker attached to the garbage can.

Do you understand what I mean, or am I still so clueless that I just donā€™t recognize the obvious solutions yet?

Of course, everyone else can help me too - thank you in advance.

Alex

It will send you a reminder once but not every 30 min and currently there are no action buttons for the reminder. So it is best to then call a script in the action.

In your actions you will need to call service / and script turn on. So when it times out after 30 min after doing nothing the action happens and then calls your script annoying you until it is done.

The script / blueprint I recommend for this is below. It is nicely done, easy to follow and the developer @samuelthng supports it to date if you have any questions regarding his blueprint. Link is below.

Hope this helps you.

Blacky :smiley:

2 Likes

what about adding data to notification service? So iOS sticky does not work, but critical: works, could be nice to add these