I have added a local calendar with recurring events and followed the automation examples from Calendar - Home Assistant but I am not receiving any notifications. When I try to Run the automation I get the following error in the traces.
Error rendering data template:
UndefinedError: 'dict object' has no attribute 'calendar_event'
You cannot test automations that rely on the trigger variable by using the “Run” button. Since there is no trigger, test running an automation that way does not place any values in the trigger variable.
To test a calendar-based automation you should create a test event that starts (or ends depending on your goal) a few minutes in the future, taking into account any offsets you have included in your trigger. Then reload the automation so that the trigger listener is created and the calendar is reloaded. Wait for your automation to fire.
Hello. How to test template sensor now? I want to know if the below code is valid and will display tomorrow’s event. These events are populated from google calendar and not from local calendar.
Once that is fixed, you can test Calendar event based template sensors by setting a test event at a time equal to your offset plus at least 15 minutes to allow for the calendar trigger listener to refresh… then wait for the trigger to fire.