Calendar Trigger Assistance

Hi all,

I am having issues with getting my calendar trigger to work. I am trying to create events in the calendar so that it can trigger my irrigation controller. I can’t seem to figure out why the event wont trigger. I am fairly new to HA and have spent hours on the problem and haven’t been able to figure it out.


alias: "Irrigation: Run Calendar Schedules"
description: Triggers when an Irrigation calendar event starts.
triggers:
  - event: start
    entity_id: calendar.irrigation
    trigger: calendar
actions:
  - data:
      level: info
      message: "Irrigation Trigger Data: {{ trigger }}"
    action: system_log.write
  - variables:
      zone_number: "{{ trigger.calendar_event.summary.split(' ')[1] }}"
      duration_minutes: |-
        {{ (as_timestamp(trigger.calendar_event.end) -
            as_timestamp(trigger.calendar_event.start)) / 60 }}
  - target:
      entity_id: script.irrigation_run_a_single_zone_for_a_duration
    data:
      variables:
        zone: "{{ zone_number }}"
        duration: "{{ duration_minutes }}"
    action: script.turn_on
mode: parallel

The most common reason for Calendar event triggers seemingly not working when you are starting out is failure to understand the 15 minute rule when testing…

Automations - Calendar

There are some work-arounds: Is there any life hack for using calendar for events less than 15 minutes in the future? - #2 by Didgeridrew