Automation stopped working (dict object' has no attribute 'calendar_event')

alias: Afvalwijzer
description: ""
triggers:
  - event: start
    offset: "-7:0:0"
    entity_id: calendar.afvalwijzer_almere
    trigger: calendar
conditions: []
actions:
  - data:
      message: >-
        Event {{ trigger.calendar_event.summary }} @ {{
        trigger.calendar_event.start }}
    action: notify.mobile_app_oneplus15
  - data:
      message: >-
        Event {{ trigger.calendar_event.summary }} @ {{
        trigger.calendar_event.start }}
    action: notify.mobile_app_OnePlusNord
mode: single

In this case there is an item in the calendar for tomorrow.

This automation is for the hacs integration: Waste Collection Schedule. It worked for years up until last week, and now it throws this error:

Error: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘calendar_event’

I have made a new simple automation, which notify’s the state of the upcoming sensor. This works, but it’s not as nice.

Does anybody know what’s wrong in this automation? I did not make changes to the automation for years, the calendar isn’t changed also.

Thnx!

Raymond

What does the debug trace show?

{
  "trace": {
    "last_step": "action/0",
    "run_id": "5abec8c00e04afff8fe3aaa4e4e46ee7",
    "state": "stopped",
    "script_execution": "error",
    "timestamp": {
      "start": "2026-04-15T18:25:35.430577+00:00",
      "finish": "2026-04-15T18:25:35.432570+00:00"
    },
    "domain": "automation",
    "item_id": "1672429167644",
    "error": "Error rendering data template: UndefinedError: 'dict object' has no attribute 'calendar_event'",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2026-04-15T18:25:35.430647+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.afvalwijzer",
              "state": "on",
              "attributes": {
                "id": "1672429167644",
                "last_triggered": "2026-04-08T15:00:00.001696+00:00",
                "mode": "single",
                "current": 0,
                "friendly_name": "Afvalwijzer"
              },
              "last_changed": "2026-04-15T18:22:20.449495+00:00",
              "last_reported": "2026-04-15T18:22:20.449495+00:00",
              "last_updated": "2026-04-15T18:22:20.449495+00:00",
              "context": {
                "id": "01KP962G912YGDS8VEEKHCJJJA",
                "parent_id": null,
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2026-04-15T18:25:35.431160+00:00",
          "changed_variables": {
            "context": {
              "id": "01KP968EP60SSRK9R0GR7NQJSS",
              "parent_id": "01KP968EP6JZG756R7K8X2APPC",
              "user_id": null
            }
          },
          "error": "Error rendering data template: UndefinedError: 'dict object' has no attribute 'calendar_event'"
        }
      ]
    },
    "config": {
      "id": "1672429167644",
      "alias": "Afvalwijzer",
      "description": "",
      "triggers": [
        {
          "event": "start",
          "offset": "-7:0:0",
          "entity_id": "calendar.afvalwijzer_almere",
          "trigger": "calendar"
        }
      ],
      "conditions": [],
      "actions": [
        {
          "data": {
            "message": "Event {{ trigger.calendar_event.summary }} @ {{ trigger.calendar_event.start }}"
          },
          "action": "notify.mobile_app_oneplus15"
        },
        {
          "data": {
            "message": "Event {{ trigger.calendar_event.summary }} @ {{ trigger.calendar_event.start }}"
          },
          "action": "notify.mobile_app_OnePlusNord"
        }
      ],
      "mode": "single"
    },
    "blueprint_inputs": null,
    "context": {
      "id": "01KP968EP60SSRK9R0GR7NQJSS",
      "parent_id": "01KP968EP6JZG756R7K8X2APPC",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Afvalwijzer",
      "message": "triggered",
      "source": null,
      "entity_id": "automation.afvalwijzer",
      "context_id": "01KP968EP60SSRK9R0GR7NQJSS",
      "domain": "automation",
      "when": 1776277535.430736
    }
  ]
}

It looks like the automation was fired manually… which doesn’t populate the trigger variable.

You’re right, stupid mistake, thnx!