The test was done using an all day event.
Blacky
The test was done using an all day event.
Blacky
Hey @Blacky
Unfortunately, I canât really get your blueprint to work. I have an iOS calendar in Home Assistant with imported events provided by our city for waste disposal. I also have a widget for displaying the calendar entries, so Home Assistant can see them.
The idea is that my hallway light will light up in the color of the trash bin to be emptied the day before as an indicator of which trash bin(s) will be emptied tomorrow. However, the automation has never been executed, I suspect it has something to do with the keyword? I use the name of the title instead of the description, as I would have to add it myself for each event.
alias: Gelber Sack Flurlicht
description: Flurspot geht an, wenn der Gelbe Sack am nÀchsten Tag abgeholt wird.
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.abfallkalender
start_calendar_offset:
hours: -13
minutes: 0
seconds: 0
days: 0
calendar_trigger: Gelber
start_notify_device:
- aeb08e5a1b3c21bcb3845a6587a3b58c
global_conditions: []
include_start_action_buttons: []
end_action_button_1: Erledigt!
include_end_action_buttons:
- enable_end_action_button_1
start_action_1:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 252
- 65
brightness_pct: 100
target:
entity_id: light.flur
include_start_auto_actions:
- enable_start_action_1
end_action_1:
- type: turn_off
device_id: 186b94c750b5bc7b03f3d95be13555fd
entity_id: 392f4c1b5e0c4ff07b2944401a2a6257
domain: light
Thanks for providing your YAML. There was a lot of YAML that was not getting used so I cleaned it all up. It was mostly the end action. The below YAML will turn ON the light for you at 11 am the day before. In regards to your key word, you can use the title (summary) or description so that is all good . Just check your keyword âGelberâ note the CAPS âGâ as it is case sensitive. Copy and replace (paste) the YAML below into your automation and see if that works and check your keyword. I didnât check the light colour but I assume it will be Yellow to line up with your keyword.
alias: Gelber Sack Flurlicht
description: Flurspot geht an, wenn der Gelbe Sack am nÀchsten Tag abgeholt wird.
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.abfallkalender
start_calendar_offset:
hours: -13
minutes: 0
seconds: 0
days: 0
calendar_trigger: Gelber
start_action_1:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 252
- 65
brightness_pct: 100
target:
entity_id: light.flur
include_start_auto_actions:
- enable_start_action_1
Let us know how you go or if there are anything I missed.
Blacky
Thank you very much for the prompt help and the revised code. With the End Action Button, I wanted to experiment and acknowledge and turn off the light after taking out the trash bin, but Iâll be satisfied once the light starts working properly.
Iâve now tried it with an event I entered myself, unfortunately, the light still does not turn on. I also set the offset to -1, which should start the light an hour before the event begins. I have also used different versions of the keyword and made sure it is spelled the same.
Even when I use the entire title, the light unfortunately remains off. Here is also a picture of the widget displaying the event:
I also tried it without any offset, but somehow it still doesnât work. The light entity is the same one I use to control the light normally. Could the problem possibly be the 24-hour format?
If I should provide more information that might help, just let me know what you need.
I am going to update this blueprint to provide more options in the confirmation message. The YAML below is for the updated version 1.4. Please update the blueprint. You can do that by just clicking on the blue import button above. Once done copy and paste this YAML into your automation replacing all the YAML that is currently there.
I have included your end actions you you will get a message and in the message will be some action buttons. If using IOS then tap message and hold for a second and the buttons will be shown. If you donât want that then just disable the end notify options.
This is not an all day calendar event. It has times so you need to work from the given times and your offsets. All day calendar event works from 12am to 12am. So for you the -1 would be 17:52. I will show you and set it up for you.
This is an all day calendar event. My calendar is called service and your one is called abfallkalender.
Before you can test it the calendar must be saved for min 15min. If you edit it then you have to wait 15min before you can test it. If you enter in an all day event then you can adjust the offsets in the automation and not effect the calendar event. If you donât wait 15min after you save / edit the calendar event then it will not work.
The below YAML will turn the light ON to yellow at 11am the day before your calendar event. At 11:00:05am you will get a notification on your device. Please check the device is correct. You then have options to action via action buttons. When you press a button a confirmation message with be sent. If you fail to push a action button then at 8pm you will get a message reminding you to take the binâs out. Once you get this message your action buttons will not work as it is a final reminder. This was done by setting the âEnd Notify - Time Delayâ to 9 hours, example 11am + 9 hours = 8pm.
alias: Gelber Sack Flurlicht
description: Flurspot geht an, wenn der Gelbe Sack am nÀchsten Tag abgeholt wird.
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.service
start_calendar_offset:
hours: -13
minutes: 0
seconds: 0
days: 0
end_calendar_offset:
hours: -12
minutes: -59
seconds: -55
days: -1
calendar_trigger: Gelber
include_start_auto_actions:
- enable_start_action_1
start_action_1:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 252
- 65
brightness_pct: 100
target:
entity_id: light.flur
include_end_notify: enable_end_notify_options
end_notify_device:
- aeb08e5a1b3c21bcb3845a6587a3b58c
include_end_action_buttons:
- enable_end_action_button_1
- enable_end_action_button_2
end_message: Who is going to take the bins out?
end_action_button_1: Bins Are Out!
end_action_button_2: Turn Light OFF!
end_action_button_stop: Cancel, leave light ON.
end_time_delay:
hours: 9
minutes: 0
seconds: 0
include_end_action_button_confirmation: enable_end_action_button_confirmation
end_action_button_confirmation_title: "{{ trigger.calendar_event.summary }}"
end_action_button_confirmation_message: Yippee the bins are out!
end_action_button_2_confirmation_message: Light has been turned OFF!
end_action_button_stop_confirmation_message: Don't forget to turn the light OFF!
end_time_delay_confirmation_message: Don't forget, we still need to take the bins out!
end_action_1:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.flur
end_action_2:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.flur
Let recap the steps for testing.
Let us know how you go.
Blacky
Upgrade Features
Maintenance
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
Thank you very much for providing the new code. I tried it again, as I didnât wait 15 minutes after entering the event during my test yesterdayâI waited only about 2-3 minutes
But unfortunately, I still canât get it to work and I think it might be due to the calendar. I am using the CalDAV integration. It seems to work fine, just maybe not with the blueprint.
I followed your instructions since I have a time-based event and not an all-day event, I removed the offset to make testing easier.
I deleted the old automation and created a new one with your code (initially setting the offset to 0), then I created an event in the calendar 30 minutes into the future. For example: Current time 9 am, new appointment at 9:30 am (same day, not an all-day event, no offset). Unfortunately, the automation is not triggered.
That could be the problem . It 100% works here as I was using that YAML and your keyword all day today testing the new features in the new release. Maybe try using the official HA calendar. Try it with this calendar.
Q: How do I install the Home Assistant Official Calendar as I canât see one?
A: Please follow these steps Click Here.
I know it works with google calendar. If you are just looking for your rubbish reminder I use the official calendar and I have entered 2 events in once as our bins change every week. Then I just set the repeat interval of 2 weeks. Your key word will probably be the colour of your bin (@yellow) etc so you can control the light colour in the action in different automatons. Below are my calendar events that may help you set it up in the same way.
Maybe try using the official calendar it is really easy to use.
Let us know if this works for you.
Blacky
Thank you very much for making your calendar entries available.
It actually works now! So, it was due to the CalDAV integration; with the local calendar, turning on the lighting in the corresponding color worked.
Iâll see if I can somehow import the waste collection calendar into the local HA calendar, which of course saves a lot of time, and if the waste collection shifts due to a holiday, I wonât have to pay extra attention to that.
Thank you very much for your support.
That is good news I am really glad you got it working now
Thanks for testing it with the CalDAV integration and letting us know it doesnât work with this integration
Maybe this can be a feature request as I think a lot of people would like this feature. @allenporter is the main developer of this awesome HA calendar. Have a look at this feature request post and maybe jump in to the conversation.
Your welcome
Enjoy
Blacky
I have the blueprint âCalendar Notifications & Actionsâ in version 1.4.
I have a linked school holiday calendar in Home Assistant.
I have set the keyword â#ferienâ in the blueprint for detection.
My problem is that when an event, for example, Pentecost holidays (all-day), is listed, it does not recognize the entry, but if, for example, Pentecost holidays are listed from 11:00 a.m. to 3:00 p.m., it is recognized and the status is âOnâ.
So far so correct, but why doesnât it work for all-day events?
Do I have a misunderstanding, or do I need to enter something else?
Thank you very much for your support.
alias: "Schulferien Erkennung "
description: ââ
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.schulferien
calendar_trigger: â#ferienâ
start_calendar_offset:
hours: 0
minutes: 0
seconds: 0
days: 0
end_calendar_offset:
hours: 0
minutes: 0
seconds: 0
days: 0
include_calendar_trigger: enable_key_word
Looks like your YAML has all the trigger set up but you havenât set up your notification or action.
Blacky
Okay, but it should actually work without the triggers as well.
If the calendar entry lasts for a few hours, itâs recognized correctly, but if the entry is for the whole day, itâs not recognized.
I also didnât have success with the trigger.
Hereâs the screenshot.
Okay, let me have a look at it as I always use offsets for all day triggers. Give me a few days as I will runs some tests.
Thanks for your input and I will get back to you.
EDIT: Just looking at the code you need to have select one option for start or end to trigger the automation. They are listed below.
Start
Use The Start Notify Options (Optional)
Use The Start Auto Action Options (Optional)
End
Use The End Notify Options (Optional)
Use The End Auto Action Options (Optional)
All my tests are set up for tonight.
Blacky
I have tested everything and it all works. You must have enabled at least one option for start or end to trigger the automation otherwise there is no point. It was built this way for performance. Below are the options for the start or end. One must be selected. Example; If your would like it to trigger at the start then one start option must be selected. If you would like it to be triggered at the end then one end option must be selected.
Start
Use The Start Notify Options (Optional)
Use The Start Auto Action Options (Optional)
End
Use The End Notify Options (Optional)
Use The End Auto Action Options (Optional)
Hope this helps you.
Blacky
Hello! It seems I cannot find a way to make it work.
I have create an automation, by using your wonderful job, that I only want to send me a mail when there is a match on an event on the calendar.
The automation starts correctly but everytime ends with:
Stopped because an error was encountered at May 17, 2024 at 9:15:00 AM (runtime: 0.05 seconds)
expected dict for dictionary value @ data['data']
( data and time varies, obviously ).
Can you point me to what Iâm doing wrong, please ?
Here the blueprint config :
id: '1715029041738'
alias: Notifica rinverdente
description: ''
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.home_calendar
calendar_trigger: '@rinverdente'
include_start_action_buttons:
- enable_start_action_button_1
include_start_auto_actions:
- enable_start_action_1
start_action_1:
- service: notify.mail
metadata: {}
data:
message: Rinverdente
title: Ricordarsi rinverdente
target: [email protected]
data: 1ml Flortis
Thanks in advance.
Try this.
service: notify.mail
data:
message: Rinverdente
title: Ricordarsi rinverdente
target: [email protected]
data:
quantity: 1ml
product: Flortis
Thanks for your reply.
How Iâm supposed to try this ? I mean: I cannot edit the yaml by hand ( unless I modify the file in the shell and restart home assistant ). The âmetadataâ part seems to be there from the webui configuration ( but I cannt find it ).
Nevermind, I found a way ( on the "edit as yaml " in the config page )
Thx
If you copy and paste your YAML.
id: '1715029041738'
alias: Notifica rinverdente
description: ''
use_blueprint:
path: Blackshome/calendar-notifications-and-actions.yaml
input:
calendar: calendar.home_calendar
calendar_trigger: '@rinverdente'
include_start_action_buttons:
- enable_start_action_button_1
include_start_auto_actions:
- enable_start_action_1
start_action_1:
- service: notify.mail
data:
message: Rinverdente
title: Ricordarsi rinverdente
target: [email protected]
data:
quantity: 1ml
product: Flortis
Did it work?
Blacky
yes !!! Thanks a million.
This way it works correctly ( well kind of but at least it sends mail ).
So the problem was that âdataâ should be formatted differently ? ( I havenât got those values in the mail BTW).