Turning on a switch based on a calendar event - help with automation

G’day all, I’m trying to set up some irrigation automations using the calendar. I’ve set up a special calendar for Irrigation which has an event “Irrigation on” when I want it to come on, and I’ve kludged together the following to turn on the valve when whenever the event appears. I’ve fixed a number of bugs in the code but I’m now at the point where I can’t see any more and so I am hoping someone can help!
I’m guessing I have missed some super-obvious typo but the whole thing is just doing my head in.

FWIW when the automation is run manually, it runs perfectly so the issue is somewhere in the trigger (or condition).

alias: "Irrigation: master valve on"
description: irrigation master valve on based on calendar event
trigger:
  - platform: calendar
    event: start
    offset: '-00:05:00'
    entity_id: calendar.irrigation
condition:
  - condition: template
    value_template: "{{ 'irrigation on' in trigger.calendar_event.summary  }}"
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.back_yard_zigbee_master_valve
  - delay:
      hours: 5
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.back_yard_zigbee_master_valve
mode: parallel