12 Days of Christmas Light Automation

I am attempting to create an automation for the 12 days of Christmas.
I have created a HA Calendar (calendar.12xmas).
I have created a calendar entry for each of the 12 days. (12day_1, 12day_2, etc)
Each day is set to start at 16:30 and stop at 22:00
I have also created 12 decorations using wled. Each of the devices is called (light.12day_1, light.12day_2, etc).

After reading a great many posts about calendars and light integerations, I am at a loss as how to create the automation.

I tried scheduler but the online directions do not match what my scheduler looks like.

Can anyone provide a basic pointer.
I have started the automation to look like this. But got lost fast.
Does the time I set on the calendar start and stop the automation.

- alias: "12 Days Xmas Day 1"
  description: "  "
  trigger:
    - platform: calendar
      event: start
      entity_id: calendar.12xmas 
      offset: "0:0:0"
  condition:
    - condition: template
      value_template: "{{ trigger.calendar_event.summary == 'Christmas Lights' }}"
  action:
    - service: light.turn_on
      target:
        entity_id: light.12day_1
  mode: single

I suggest the following strategy:

For each one of the 12 scheduled events in calendar.12xmas, enter the light’s entity_id in the event’s Description field. For example, for the first day’s event, enter light.12day_1, for the second day’s event enter light.12day_2, etc.

Now you can use a single automation to turn on/off the appropriate light for each one of the 12 days.

alias: "12 Days Xmas"
description: ""
trigger:
  - platform: calendar
    entity_id: calendar.12xmas 
    offset: "0:0:0"
condition:
  - condition: template
    value_template: "{{ trigger.calendar_event.summary == 'Christmas Lights' }}"
action:
  - service: "light.turn_{{ 'on' if trigger.event == 'start' else 'off' }}"
    target:
      entity_id: "{{ trigger.calendar_event.description }}"
mode: single

EDIT

This automation’s Calendar Trigger will only trigger at the start of a scheduled event but not at the end of the event (based on tests performed with version 2025.11.1). Therefore it is unsuitable for your needs. Two Calendar Triggers are required, one with event: start and the other with event: end.

Are the 12 decorations only used on their day or from their day until the last day?

If the latter, should they all come on at the same time or do you want them to come on one-by-one?

If one-by-one should they go in ascending order or in descending order like the song?

Day 1 will go 12 days
Day 2 will go 11 days and so on, until the 12th day when all are lit up.

For that I would modify Taras’ example above.

Instead of having the light’s entity ID in the description, just put the day number. Then that can be used to generate a list for a repeat to do them sequentially:

alias: "12 Days Xmas"
description: ""
trigger:
  - platform: calendar
    entity_id: calendar.12xmas 
    event: start
    offset: "0:0:0"
  - platform: calendar
    entity_id: calendar.12xmas 
    event: end
    offset: "0:0:0"
condition:
  - condition: template
    value_template: "{{ trigger.calendar_event.summary == 'Christmas Lights' }}"
action:
  - repeat:
      for_each: "{{ range(1, trigger.calendar_event.description | int(1) +1) }}"
      sequence:
        - service: "light.turn_{{ 'on' if trigger.event == 'start' else 'off' }}"
          target:
            entity_id: "light.12day_{{ repeat.item }}"
        - delay: 1
mode: single

… or to do them all at once:

alias: "12 Days Xmas"
description: ""
trigger:
  - platform: calendar
    entity_id: calendar.12xmas 
    event: start
    offset: "0:0:0"
  - platform: calendar
    entity_id: calendar.12xmas 
    event: end
    offset: "0:0:0"
condition:
  - condition: template
    value_template: "{{ trigger.calendar_event.summary == 'Christmas Lights' }}"
action:
  - variables:
      value: "{{ trigger.calendar_event.description|int(1) }}"
      entities: |
        {% macro prepend(root,pre)%}
        {{- pre~root -}}
        {% endmacro %}
        {{ range(1,value+1) | map('apply',prepend,'light.12day_') | list }}
  - service: "light.turn_{{ 'on' if trigger.event == 'start' else 'off' }}"
    target:
      entity_id: "{{ entities }}"
mode: single

Follow-up:

The example I posted above will not turn off the lights.

I made an incorrect assumption about how the Calendar Trigger’s event option behaves. Omitting it will simply cause the Calendar Trigger to fire at the start of a scheduled event but not at the end of the event (so the light would get turned on but not off).

You must create two Calendar Triggers, one configured with event: start and the other with event: end.

Thank you for the update.
After fooling around with it I figured it out and saw the exact same thing.
I have not had time to come back to the forum for a few days to thank everyone.