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
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
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
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
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
what about adding data to notification service? So iOS sticky does not work, but critical: works, could be nice to add these
Thank you so much for sharing this blueprint, Iām still learning and this is so helpful!
Iām struggling to get one of my notifications to workā¦ I set up a reminder for every birthday. It works great, except when there is more than one birthday on a dayā¦ they are separate calendar entries, but I only get one notification. Iām sure itās user error, just canāt figure out what Iām doing wrong.
Firstly welcome to the community.
Thanks for the heads up. I will need to look into this as I can see what you are saying. I have put this on my list to do.
Blacky
Thanks for this blueprint, it helped me a lot!
I want to close the notification when I press an action. Is there a way to add a tag to the notification? So I can send a āclear_notificationā as an action on the button?
The cancel button also doesnāt seem to close the notification, but possibly Iām doing something wrong.
I use IOS. so the cancel is there for that.
This is the information in the docs for Android.
When a notification is cleared Android will notify the Companion app of the event. A notification is considered cleared if you either manually swipe it away from the notification status bar or if you click on the Clear All button.
Blacky
I saw that also on the documentation, but that didnāt look correct.
On Android it can be cleared with a tag. I made an example that clears the notification after 30 seconds (But in my case I would perform that as an action when the button is pressed).
alias: Notification Test
description: āā
trigger:
condition:
action:
- service: notify.mobile_app_home_samsung_s21
metadata: {}
data:
title: Test
message: Test notification
data:
tag: testnotificatie
actions:
- action: URI
title: Open Url
uri: https://google.com- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0- service: notify.mobile_app_home_samsung_s21
metadata: {}
data:
message: clear_notification
data:
tag: testnotificatie
mode: single
So for it to work on Android, the cancel-button would have to send the clear_notification - message with the tag (or just be invisible so one of the action buttons can be setup for it).
Thank you for this incredible blueprint!
Is there a way I can configure this to send me a notification for each event on that particular day, at a particular time?
For example, letās say I have 3 events today and at 10h00 I would receive 3 different notifications, or even a single notification with all relevant information.
Thanks!
Thanks for this information I will look into it.
Blacky
Hi Ricardo, welcome to the community.
Yes you can do this. It is really up to you if you would like to use key word or on every calendar event. If you use key word you can have one automation an you may choose your key word to be @notifications and use the same key word in the events you would like to be notified of or you can use multiple automation and or different key words it is totally up to you.
Please note that I do have an item on my list to look at calendar events at the same time only sending the first event. So for now you may have to adjust the time of the events to be slightly different.
Blacky
Can you add a trigger key word option is similar to ādonāt use key wordā but will trigger on ANY word EXCEPT a string I specify? Basically āAlways trigger except for ākey wordā in calendarā.
My use case: Fantastical for Mac leaves events on my calendar that are ācancelledā. They show up as āCancelled:ā. I want your automation to trigger in ALL events EXCEPT for the ones that start with āCancelled:ā in them.
Thank you!
Have you tried using the global conditions. In a template maybe something like this.
{{ is_state_attr('calendar.YOUR_CALENDAR_ENTITY_ID', 'description', 'Cancelled:') }}
Blacky
Most excellent, beautiful work, much, much thanks for sharing it
Your welcome, glad you like it and thanks for you kind words. It nice to get these ones every now and then
Blacky