📆 Calendar Notifications & Actions

FAQ

Q: How do I use Trigger Key Words?

A: Please follow these steps Click Here.

Q: How do I install the Home Assistant Official Calendar as I can’t see one?

A: Please follow these steps Click Here.

Q: I can’t get the automation to work when testing it, what am I doing wrong?

A: For the automation to fire, the calendar event must be set at least 15 min into the future or it will not trigger. So if you are testing it and can’t work out why it is not working this will probably be it. Example; if it is 3pm now and you are testing it then when you enter in a calendar event the start time must be 3:15pm or greater than 3:15pm. Then you have to wait for the calendar event to fire. Also note, if you have set the time offsets when testing and setting 15 min into the future the offsets must be “0”.

Q: How do I set up a rubbish reminder to take the bins out?

A: Please follow these steps Click Here.

1 Like

FAQ - The Settings & Best Practice Guidelines

:zap: TRIGGER

The trigger are made up of 4 inputs.

  • Calendar: This is the calendar that the event will be in.
  • Use The Calendar Trigger - Key Word: You can select to use “Key Words” or trigger on every calendar event.
  • Key Word: This is a key word that you can have in the summary and or description.
  • Calendar Start - Offset: This is the offset to the start time in the calendar event. Say your calendar event start time is 3pm and you would like to be notified or run an action at 2pm then your start offset would be -1 h (minus one hour).
  • Calendar End - Offset: This is the offset to the end time in the calendar event. Say your calendar event end time is 5pm and you would like to be notified or run an action at 6pm then your end offset would be “1” h(+ one hour).

:globe_with_meridians: Global Conditions

You can enter in any global condition you like.

:incoming_envelope: Notify Options

The notify options are made up of 4 inputs.

  • Start / End Notify Options: If you would like a notification message you will need to enable this option. You do not need to enable this to use the action options.
  • Devices To Notify: This is the devices to notify. The device must have Home Assistant mobile app and in the settings you need to allow notifications.
  • Title: The title of the message you would like. If you would like the summary of the calendar event the use “{{ trigger.calendar_event.summary }}”. It is set as the default.
  • Message: The title of the message you would like. If you would like the description of the calendar event the use “{{ trigger.calendar_event.description }}”. It is set as the default.

:mailbox_with_mail: Start / End Notify - Action Buttons Options

The action button options are made up of 4 inputs. There is also and input to enable each button individually.

  • Action Button 1
  • Action Button 2
  • Action Button 3
  • CANCEL Action Button

Each action button can just be a stand alone button that will do nothing but can be used in a confirmation message, or you can have each button run a set of action. Each button is linked to the below actions.

  • Action Button 1 will be linked to Action 1
  • Action Button 2 will be linked to Action 2
  • Action Button 3 will be linked to Action 3

If no actions are entered into the below action 1, 2 or 3 then the button will do nothing and just be a stand alone button. Any time you select to use an action button being action button 1, 2 or 3 then the cancel action button will be included in the message.

If you press the cancel action button it will stop the automation including all actions even if an “Auto Action Options” is enabled.

Note: you do not need to use a action button to run an action. In fact you do not need to use any notifications options to run an action (see below).

:hourglass_flowing_sand: Start / End Notify - Time Delay

The time delay after which the automation will continue its execution if an action button has not been pressed.

:white_check_mark: Start / End Notify - Action Button Confirmation Option

The action button confirmation options are made up of 3 inputs.

  • Action Button Confirmation Title
  • Action Button Confirmation Message
  • Time Delay Confirmation Message

Enabling this option will send a confirmation message. There can be 2 confirmation messages depending on what happens when using action buttons.

  1. If an action button is pressed then the Title and 'Action Button Confirmation Message" will be sent.
  2. If the time delay has passed then the Title and 'Time Delay Confirmation Message" will be sent.

:play_or_pause_button: Start / End Auto Action Options

This is used if you would like to run the actions on a start or end trigger. You do not need to enable notification or run any action buttons for the below actions to run. By simply enabling one or all the auto actions will allow the action/s to run. The only time it will not run any of the actions is, if you are using notifications with action buttons and you press the cancel button.

You could also use an action button above (say action button 1 & 2) in a notification and then also set action 3 to do something. In doing so this will run the action of 1 or 2 depending on what button you press in the notification and always run action 3. If you dont press any action button in the notification and the time delay passes + you have only auto enabled action 3 then action 3 will run.

Recap: So if you use the auto enable option it will always run the action unless you cancel the automation using the notification cancel action button.

:running_man: Start / End Action :running_woman:

You have 3 action.

  • Action1
  • Action 2
  • Action 3

You can add as many actions as you like into any of the 3 actions. Each action is also linked to the notify action button.

  • Action 1 will be linked to Action Button 1
  • Action 2 will be linked to Action Button 2
  • Action 3 will be linked to Action Button 3

You do not need to enable an auto action option for the action to work with a notification action button.

Hope this helps you understand the settings.

Enjoy

Blacky

Back to FAQ: Click Here

2 Likes

FAQ - Trigger Key words

Key word links the calendar event to this automation as the trigger. A key word can contain letters, numbers & symbols similar to a password. Input a single keyword or, for multiple keywords, use a comma-separated list. Enter these keywords into the calendar event summary or description to trigger this automation. Keywords can include letters, numbers, and symbols. Be mindful of your choices, as any event containing these keywords will trigger the automation.

To prevent false triggers, it’s recommended to use @ or # followed by the keyword in the calendar event (e.g., @bins or #bins) or for multiple keywords (e.g., @bins, @rubbish).

USE OF KEY WORD EXAMPLE

For our rubbish we have 3 bins;

  1. Rubbish
  2. Recyclable
  3. Green Waste

One week the collection is rubbish and recyclable. Next week it is rubbish and green waste. It then repeats over again.

I created two calendar events with a repeat weekly and a repeat interval of 2.

  • The 1st calendar event, with a summary “Bins - Rubbish & Recyclable” and in the description I put a key word @bins.
  • The 2nd calendar event, with a summary “Bins - Rubbish & Green Waste” and in the description I put a key word @bins.

Then I created a automation with this blueprint called “Bin Reminder”. In the “Calendar Trigger - Key Word…” I enter “@bins” then entered all the settings as required. Now I will be notified on both calendar events as “@bins” is the trigger key word. Because the summary is different in the calendar events, not only am I reminded to take the bins out, I am also reminded what bis to take out as I always forget :wink:

For a full detail step by step guide on how to set this up Click Here

HOW TO NOTIFY FAMILY EASY OF A CALENDAR EVENTS

What I do is use a key word for each member of the family that can be notified. Example;

  • @blacky
  • @mrs_blacky
  • @blacky_child1
  • @blacky_child2
  • @blacky_child3

Obviously I use their first name and not what is shown above.

I then create an notification message for each family member with their key word in the automation. The title and message is includes the summary and description automatically by default using “{{ trigger.calendar_event.summary }} and {{ trigger.calendar_event.description }}”, so I make sure the summary and description will suit the title and message when notified. Then when I create a calendar event, in the description I put the @… of each family members I would like to notify of this calendar event. Then that’s it… they will be notified. I dont need to create any more notify automations for each separate calendar event.

Hope this helps you understand and how to use the calendar key word.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

2 Likes

Initial release 1.0

New blueprint :partying_face: Hope you like it :wink:

Below are some use cases.

  • Used as an add on for my sensor light blueprint. This will allow you to link automations so you can have automated lights for special occasions (Xmas, Halloween, etc). More on this and how to set it all up will be in the above “Settings & Best Practice Guidelines” in the next few days.
  • Rubbish reminder or any reminder of a calendar event.
  • Set up an notify automation once and link people in calender events with one key word. More on this and how to set it all up will be in the above “Settings & Best Practice Guidelines” in the next few days.
  • Have a calendar event turn something ON at the start and OFF at the end.
  • Notifications with action buttons that can turn ON and OFF anything you like.

Try it out and let us know what you think :smiley:

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

2 Likes

Is it possible to expand this to send notifications to any notify. entity? Specifically I do all my notifications through telegram.

1 Like

If you enable one of the Auto Action Options at the end of the blueprint, you can manually set it to any service you like (ej. any notify service).

Great blueprint, as always :tada:

2 Likes

Great to know, I’ll mess around with it.

Loving your blueprints thanks for all the support.

1 Like

New Update 1.1

Bugs Fixes :bug:

  • Fixed bugs in “Start Action - Action 3” missing variables input.
  • Fixed bugs in “End Action - Action 3” missing variables input.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

New Update 1.2

Performance Upgrade :rocket:

  • Automation sequence will only run when a notification or auto action is selected for start or end triggers.

Bugs Fixes :bug:

  • Fixed bugs when a confirmation message was not selected.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

1 Like

FAQ - How To Install The Official Home Assistant Calendar

Please see the link below to the official HA calendar.

When you click on the link above there is an “Add Integration” button. Click on it and follow the steps.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

Looking at this, unless I am misunderstanding, the auto actions can not have an offset. Is that true?

Does this have to be a local calendar? I am trying to use a google calendar with the below automation and appointment and nothing fired.

alias: Guests Arriving and Departing notifcation
description: >-
  Uses the entry #guest in the HA-Guest calendar to send arrival and departure
  information via telegram.
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.ha_guests
    calendar_trigger: "#guest"
    start_calendar_offset:
      hours: 0
      minutes: 0
      seconds: 0
      days: 1
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 49a618d7a5f97bf3dc5b4db3cf1a4e44
    include_start_action_buttons: []
    include_start_auto_actions:
      - enable_start_action_1
    start_action_1:
      - service: notify.pottshomebot
        data:
          message: Would you like to turn on the guests present helper?
          data:
            inline_keyboard:
              - Guests Arriving?:/guests
    include_end_auto_actions:
      - enable_end_action_1
    end_action_1:
      - service: notify.pottshomebot
        data:
          title: Guests Are departing
          message: >-
            The calendar shows that guests are departing soon. Would you like to
            turn off the Guests Present toggle?
          data:
            inline_keyboard:
              - Yes:/Guest_present_departing
              - Remind Me Tomorrow :/Guests_present_delay
    end_notify_device:
      - 49a618d7a5f97bf3dc5b4db3cf1a4e44

image

@potts-mike

Hi Mike,

I have only tested it with HA calendar but it should work with any calendar HA can see. The thing that can catch you out is when testing you need to set the calendar at least 15 min into the future or it will not fire. Example: if it is 2pm now when you enter your calendar event in, it must be set at 2:15pm. Then you have to wait for it to fire. :wink:

Can you try this and let us know if it works with the google calendar, it would be nice to know :+1:

Thanks

Blacky :smiley:

PS: Your YAML looks good.

1 Like

I moved the calendar event to 9/13. Let’s see what happens. If it doesn’t fire I’ll change it to a local calendar.

1 Like

FAQ: How do I set up a rubbish reminder?

We will go through how to set up a rubbish / bin / trash reminder. In this example we have a 2 bin rotation but some of you may have a 4 bin rotation so you may need to change the events to suit you.

Our bins have colour lids that represents what we put in them. We have a Red, Yellow & Green bin. One week we need to put out Green and Red, and the next week we need to put out Green and Yellow.

How To Set Up The Notification Automation - Rubbish Reminder

  1. First you must have a calendar in Home Assistant (HA). HA has done a lot of work on their local calender and it works realy well with HA :heart:. This is the one I use as HA will always make sure it works. If you haven’t installed it yet you will need to add it into HA. To do this there is a link below to the Official HA Calendar. Once you click on the link there is a big blue button “Add Integration”. Click on it and follow the steps.

    Local Calendar - Home Assistant

    You will also need to make sure your mobile App allows notifications by going into the settings.

  2. Once installed go into the calendar and click on “Add Event”. Then I selected weekly under repeat.

  3. Now I added in all the information. The summary has the bins I need to take out and in the description I put the Trigger - Key Word “@bins”. Also note it is in the “Home” calendar. Make it an all day event on the day the bins get collected with a repeat interval of 2 weeks as I have a rotation of bins. Set it to never end, click save. Then I add another event for the following week with a different summary for the other bins rotation. The rest is the same and once done click save.

  4. Now that our calendar events are set up we need to create an automation. Use this blueprint. The first thing is to add the calendar, make sure “Use “Key Word” in calendar” is ticked and add the key word @bins. Because we made it an all day event we will need to put in the offset. The start is “-8 (minus 8 hours)” this works out to be 12am - 8 hours = 4pm the day before the bins are collected. So at 4pm the day before collection it will trigger the “Start” settings. I also would like a reminder to bring the bins back so I put an offset of “-9 (minus 9 hours)” this works out to be 12am - 9 = 3pm on the day the bins are collected as they always collect the bins early in the morning. So at 3pm it will trigger the “End” settings. In global conditions we will leave this blank. All the triggers settings and global conditions are now set.

  5. Next we need to set up the “Start” notify message as below. I only need one action button but you can add 3 action buttons. When adding the action buttons the cancel button will be added automaticity. This notification will be sent at 4pm the day before the bins are collected. Note in the title we have put “{{ trigger.calendar_event.summary }}” This will make sure the calendar summary is shown in the notify message. This is why I added 2 events sowing what bins that were needed to be taken out. Now the notification will let me know what bins to take out as well to take the bins out as I can never keep track of it.

  6. Because I have two people to notify I use the confirmation message as it let the other person know if the bins were taken out. The time delay is 4 hours. So our trigger was sent at 4pm + 4 hours = 8pm. If no one takes the bins out and presses an action button the automation will continue to run. So when this happens at 8pm we get another message in the “Time Delay Confirmation Message” reminding us to take the bins out again.

    If you would just like to receive the “Time Delay Confirmation Message” as a second reminder then you would need to enable this option.

  7. Below is the action part of the automation. For this automation I don’t need HA to do anything so it is left blank. If you wanted HA to do something this is where you would add it.

  8. Now we need to do the “End” notification. It is all the same as before like the “Start”. The “End” will send me a notification at 3pm on the day the bins were collected.

  9. Again confirmation is the same as the “start” but our time delay is 3:30. So our trigger was sent at 3pm + 3:30 hours = 6:30pm. At 6:30 if no action button was pressed we will get a “Time Delay Confirmation Message” reminding us again to get the bins.

  10. Again we don’t need HA to do any actions.

Now click save and your done :partying_face:.

You will now have a bin reminder that will send a notify message to the phones every week. The message will be, to take the bins out and to bring them back. It will also remind you of what bins to take out as we added 2 rotation calendar events with different summary’s. :wink:

NOTE: For the automation to fire, the calendar event must be set at least 15 min into the future or it will not trigger. So if you are testing it and can’t work out why it is not working this will probably be it. Example; if it is 3pm now and you are testing it then when you enter in a calendar event the start time must be 3:15pm or greater than 3:15pm. Then you have to wait for the calendar event to fire.

If you have set it up like this then also note the time offsets when testing. When testing and setting 15 min into the future the offsets must be “0”

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

2 Likes

Even after moving the event to the 13th on the 12th this blue print didn’t fire. I guess I’ll change it to a local calendar and see what happens. Any other troubleshooting/logging that I can provide?

I have just gone through this with another community member privately and we got it to work. It took a few days but we got there in the end.

The above post yours on “How do I set up a rubbish reminder” will walk you through a lot of the settings.

One thing you could try first as it is a lot easer to test if you can receive a notify message (even if you know you can as this blueprint has the same format) it to download my :round_pushpin: State Notifications & Actions blueprint and just use a light or something with an ON / OFF state. you can turn it ON and OFF to receive messages. Once you know it works move to this blueprint.

also could please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

And we will also need a screen shot of your calendar event.

@potts-mike

Hi Mike, sorry I just looked at your above post with your YAML again an just noticed one thing. You have a calendar start offset of 1 day. This will be the why it is not sending you a message. Not sure if you have worked this out our not yet but I thought I would let you know. If you test it set it to “0” then back to 1 day.

Sorry for not picking this up earlier.

Blacky :pensive:

No worries. It’s going to be a couple days before I can get back to this but I’ll test it at 0 days.

The intent is to get a notification the day before the event.

@potts-mike

No problem, it will be nice to know if it is working with the google calendar.

If you would like it the day before the event, then you must enter “-1 (minus 1 day)”. Currently you have set it to “1 ( + 1 day)” so this will notify you 1 day after the calendar event. So if you are testing 1 day before and it is 3pm now on 17 Sep 2023 then your calendar event must be set at more than 3:15pm on 18 Sep 2023. Then you would enter as below, again note the minus value.

Hope this helps and it would be nice to know how you went.

Blacky :smiley: