📆 Calendar Notifications & Actions

@erasma

Welcome to the community.

You can’t run it manually.

Your calendar event must be added to HA 15min into the future. HA need 15 min to register the calendar event so if you try and add a calendar event in 1 min before your notification to test it then it will not work. Example if the time now is 4:00pm and you add a calendar event in to test then it must be 4:15pm. Then you have to wait. If you put in a all day calendar event then you have to wait 15 min before you can test it. You then can keep adjusting your offsets in the blueprint so you can test it quicker.

Your start offset is -24 so this will be the problem. To get your head around it try no offset and just add a calendar event in 15 min into the future, sit back and wait for 15 min to pass and you should get the notification.

Blacky :smiley:

thank you for the reply - trying now have set an event in the calendar to 30min in the future with no offset

Will let you know how I get on

image

alias: Calendar Notifications & Actions
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.calendar
    include_calendar_trigger: disable_key_word
    start_calendar_offset:
      hours: 0
      minutes: 0
      seconds: 0
      days: 0
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 6de
    end_calendar_offset:
      hours: 0
      minutes: 0
      seconds: 0
      days: 0
    include_start_action_button_confirmation: disable_start_action_button_confirmation
    include_start_auto_actions: []
    start_notify_data: []
    include_end_notify: disable_end_notify_options

It worked thank you great automation

@erasma

Your welcome, glad you got the hang of it now.

Blacky :smiley:

Firstly, thank you for this automation I have been using it for a while.

I just updated to the latest 1.8 and I get the following error (even though I see the notification and all works)
Note: I only have the default settings in for the start notify title/description fields, and really only using it for bin days at the moment so no actions etc.

Template variable error: ‘list object’ has no attribute ‘split’ when rendering ‘{% set keywords = calendar_trigger.split(’,‘) %} {% set keywords = keywords | map(‘trim’) | list %} {{ keywords | select(‘in’, trigger.calendar_event.summary) | list | count > 0 }}’
Template variable error: ‘list object’ has no attribute ‘split’ when rendering ‘{% set keywords = calendar_trigger.split(’,‘) %} {% set keywords = keywords | map(‘trim’) | list %} {{ keywords | select(‘in’, trigger.calendar_event.description) | list | count > 0 }}’

any ideas what I might have configured wrong (fyi when I went from 1.7 to 1.8 I recreated the automation)

Regards,

Mobs

@mobs

Welcome to the community.

Could you 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.

FYI When you update a blueprint you don’t need to recreate the automation. This is the beauty of blueprints, you can update the blueprint and it carries through all of your existing automations. You may be aware of this already.

Blacky :smiley:

Thanks Blacky,

Yea the recreate was only because I was seeing the error just thought id start fresh and see if it replicated (which it did). YAML below.

alias: Bin Days - Tell House which Bins are to be put out
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.bin_days
    include_calendar_trigger: disable_key_word
    start_calendar_offset:
      hours: -5
      minutes: 0
      seconds: 0
      days: 0
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 2e8b983bcce5fa60516670ec489d4d66
      - ad63a2cfb8aac012c5110e210afe1ab0
      - e261d8fad1ad85416c415300a92045ac
      - 5e1effb79cbdb21f5df174540ea7c0ee
    start_notify_data:
      - sticky
    start_notify_interruption_level: time-sensitive

@mobs

Thanks for your YAML, all fixed. Problem was if you had no keyword in the input. You can update now as it has been updated already.

Thanks for your help and reporting the bug.

Blacky :smiley:

1 Like

New Update 1.9

Transform Your Calendar: Turn Events Into Notifications and Actions! :calendar: :bell: :gear:

Bugs Fixes :bug:

  • Fixed error log when there was no keyword in the 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:

Thankyou so Much Blacky too!

1 Like

Did anyone manage to get TTS notifications via companion app to work as a “Calendar Start action”? See pictures of interface, am I missing some configuration?


@marksev1

I could be wrong but Home Assistant does not support playing TTS audio directly through the mobile app. The mobile app is designed for text-based notifications and cannot natively handle TTS playback.

Blacky :smiley:

It does work, the companion app generates the TTS (or the assistant in the phone maybe). This code snippet works in another automation that i use:

action: notify.mobile_app_vog_l29
metadata: {}
data:
  message: TTS
  data:
    tts_text: Alarm! Someone is in the house! Inspect!
    media_stream: alarm_stream
    ttl: 0
    priority: high

The phone “talks” it says Alarm! Someone is in the house! Inspect! :smiley: .

While this from your blueprint doesn’t:

alias: Nova avtomatizacija
description: ""
use_blueprint:
  path: Blackshome/calendar-notifications-and-actions.yaml
  input:
    calendar: calendar.sestanki_in_rojstni_dnevi
    include_calendar_trigger: disable_key_word
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 7ddf3ab80971f424ff7d5e6c3c0186b8
    start_notify_data:
      - high_priority
    include_start_auto_actions:
      - enable_start_action_1
    start_action_1:
      - action: notify.mobile_app_vog_l29
        metadata: {}
        data:
          message: TTS
          data:
            tts_text: You have a calendar event today!
            media_stream: alarm_stream
            ttl: 0
            priority: high

Do you see some error? How do I debug this?

@marksev1

Yep your correct, I tested this and it works on Android with your exact code (just changed the device and calendar). I am iOS. I did notice when I had 2 automation with 2 calendar events at the same time it only sent one voice notification once but I received 2 text messages. When I had 2 automation with 2 calendar events at the same time I got 3 voice messages and 4 text message.

Important Note:
When adding a calendar event to Home Assistant (HA), it must be scheduled at least 15 minutes into the future. This is because HA needs 15 minutes to register the event.

If you attempt to test the blueprint with a calendar event set, for example, only 1 minute before your intended notification, it will not work.

Example:

  • If the current time is 4:00 PM, and you want to test, your calendar event must be scheduled for 4:15 PM or later.
  • After adding the event, you’ll need to wait for HA to register it.

For all-day events:
If you add an all-day calendar event, you still need to wait 15 minutes before testing.

Blacky :smiley:

I tested this 1 hour into future and it didn’t work…The event is not all day as far as i know, just one hour duration. Its not the duration thing, it must be something else.

So I have multiple automations from your blueprint - with same day and minus one day offset and if I have the automation with the TTS active I get the textual notification (twice, if I have two same day notifications active) but I don’t get the TTS. It’s like the “action” doesn’t get triggered.

@marksev1

I just ran another test again, worked perfectly. Got a text and a voice message.

Have you updated to the latest blueprint? Push the import blue button at the top again.

Blacky :smiley:

I have your latest version, doesn’t work the “voice message” :frowning:

@marksev1

I can auusre you that it is working here, this is the YAML I have and tested it is working.

  input:
    calendar: calendar.home
    include_calendar_trigger: disable_key_word
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - my_device_here....
    start_notify_data:
      - high_priority
    include_start_auto_actions:
      - enable_start_action_1
    start_action_1:
      - action: notify.mobile_app_sm_g950f
        metadata: {}
        data:
          message: TTS
          data:
            tts_text: Testing 1, 2, 3 testing 1, 2, 3!
            media_stream: alarm_stream
            ttl: 0
            priority: high

Blacky :smiley:

@Blacky Thanks for yet an amazing blueprint from a fresh HA user

@grassiekuik

Welcome to the community.

I love getting these ones… thanks for you kind words and I am glad you like it.

Enjoy

Blacky :smiley: