I am using the Calendar integration for automation of reminders. I want to send the reminders to the Awtrix LED. Following the documented calendar “get_cal_events” and using a response variable, in a subsequent action the variable does not contain the events and I receive and error message in the logs that my calendar object is not found. Error while executing automation automation.awtrix_rest_reminders: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘calendar.main’. The get_cal_events works fine in the developers tools->service but no joy in an automation. Automation below. Any suggestions. Thanks in advance.
alias: Awtrix_REST_Reminders
description: ""
trigger:
- platform: time_pattern
minutes: /1
condition: []
action:
- service: script.get_cal_events
target:
entity_id: calendar.main
data:
duration:
days: 1
response_variable: agenda
- service: rest_command.awtrix_message
data:
message: >-
Reminder {% for event in agenda["calendar.main"]["events"] %} {{
event.start}}: {{ event.summary }} {% endfor %}
color: "#E97451"
duration: 15
mode: queued