I am trying to automate event in calendar to send an email when an event start.
My Nextcloud calendar is available in HA and entities are present
I am referencing to the guide : Calendar
I receive this message : Error rendering data template: UndefinedError: âtriggerâ is undefined
If i donât use these template variables, the automation is running right
Is it something to modify or to add in the code to be able to use the trigger.calendar_event.summary and trigger.calendar_event.start template variables ?
If you tested it by using the automationâs Run command or by executing the automation.trigger service call, it will produce the error you received.
The trigger variable only exists if the automationâs Calendar Trigger is responsible for triggering the automation. The Run command doesnât exercise an automationâs triggers, it only executes the automationâs action, so in that situation the trigger variable is undefined.
By âexecute itâ do you mean that you are manually triggering the automation using the âRunâ button? Manually triggering an automation does not create a trigger variable that can be referenced as you have in you notification. To test your automation you will need to create a test event in your calendar or wait for an existing event to start.