Calendar based triggers

How are you testing the automation?

The trigger variable exists only if your automation was triggered by its Calendar Trigger. If you use another means to test it (the Run command or automation.trigger service call) the trigger variable will be undefined.

Reference: Testing your automation

alias: Work day
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "0:0:0"
    entity_id: calendar.rhs_sy22_23
condition:
  - condition: template
    value_template: "{{ 'workday' in trigger.calendar_event.summary }}"
action:
  - service: notify.persistent_notification
    data:
      message: "It's a workday."
mode: single