My intention is to act on a triggered event if it has a word in the summary.
Problem:
The automation is triggered ( I see the blue banner on trigger while watching the condition when the event comes) but the action is never executed.
IF the text in the notification has no template âtest notificationâ I get the notification.
But if it has something as simple as â{{ trigger.calendar_event.summary }}â it is not send.
It should send a notification with the summary of the event.
I would then put â{{ trigger.calendar_event.summary is search(âtestâ) }}â in a condition. Which doesnât work as the condition is false.
Anybody? Is this supposed to work or am I doing it wrong.
I donât think so as Iâve copied this from various forum posts. So I guess here is a bug somewhere.
Are you testing the automation by waiting until a scheduled event in calendar.home starts?
Thatâs the only way to test this automation because its template references the trigger object which only exists when the Calendar Trigger is triggered by an event (not by any other means like using the Run command).
Correct, thatâs exactly what Iâm doing. And it is being triggered as the trigger can be seen getting the blue âtriggerâ band.
But the action isnât working as I explained. Only normal text in a message is sent. When there is the template (as test to see what is passed from the trigger) or I try to use it in a condition the message is not sent.
Why does the blue banner say triggered, exactly at the time it should be??
Doesnât seem right.
BTW I have copied this example exactly as described on numerous posts/videos and it is shown there exactly as it happens here: time comes blue banner shows and action is taken.
As I have said the problem is ONLY when i try to have a conditon referencing details of the trigger object OR if the same is in the notification. If the notification has only a text (such as âautomation triggeredâ) the notification IS send.
When you create an automation with the Automation Editor, it automatically assigns it an id property with a unique value. The Automation Editor doesnât display id in visual mode or even in YAML mode but itâs present if one examines the contents of the automations.yaml file. For an automation with an id, Home Assistant will record a trace whenever itâs triggered.
When you create an automation with a text editor, it wonât automatically assigns it an id property; you have to manually include it and assign it a unique value. If you donât do that, Home Assistant will not produce a trace whenever the automation is triggered.
Automations created in YAML must have an id assigned in order for debugging traces to be stored.
If you created that automation using the Automation Editor, it was assigned an id and traces will be recorded whenever it triggers.
However, if an automation with an id is executed by any method other than by one of its own triggers (such as by using the Run command or the automation.trigger service call) the trigger variable will be undefined. Any reference within the automation to the undefined trigger variable will fail (and report an error in the Log).
Anyway as this isnât working (as it should and actually I got one notification on try and on the next again none, itâs at least not reliable) Iâve deleted the calendar integration and stopped using it shelving the automations I had in mindâŚ
Then the automation will have an automatically assigned id and traces will be generated when the automation is triggered. No traces means no triggering. This is true for almost any kind of trigger, not just the Calendar Trigger.
I and many others use the Calendar Trigger and it works as documented. There are numerous examples of its successful use throughout the forum. No one else has reported the problem you have described so itâs unclear why itâs happening exclusively for you.
The discussion in that Issue ends with bobvandevijver saying he would create a PR.
I found the PR and itâs for the TwenteMilieu integration but it was never merged into a release version of Home Assistant.
However it started a discussion about improving the validation of scheduled calendar events. In other words, things like ensuring an eventâs end time isnât before its start time.
Yes, local calendar. But I also tried icloud one with same result.
In the meantime and since last post Iâve tried the following:
setup a fresh proxmox HA VM. Imported last backup. Install local calendar, installed above blueprint and did a test. received a message one time but not again in new tests. Same same.
Donât forget that calendar events are detected periodically. During your tests, if you create an event that is scheduled within the next 15 minutes, odds are that it wonât be detected.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topicâs title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.