Conditional color change or color temperature

I have an automation for my outdoor lights that change to red during the holiday season. I would like to have a warm white if not but cannot figure out how to call a color temp and a color name in the same automation.

Here is what I am using:

service: light.turn_on
data:
  brightness_pct: 100
  color_name: "{{ 'red' if christmas_time == 'on' else 'white' }}"
target:
  device_id: a1fd282ac0fd73418

Seems correct to me.
What is christmas_time? Is it a variable?

It’s a date range I have set up as a binary.

Binary what? Variable or sensor.
When you ask a question its important that you are transparent and show us what we ask for.

It’s a binary sensor. Pretty commonly used to do this kind of thing.

- platform: template
  sensors:
    christmas_time:
      value_template: >
        {% set today = states('sensor.date').split('-') %}
        {% set month = today[1]|int %}
        {% set day = today[2]|int %}
        {{ month == 12 and day >= 5 or month == 1 and day <= 6 }}

And when using entities in templates it’s quite common to use states('sensor.christmas_time').

Had it been a variable, then it would have been correct.

True. Thank-you for the tip.
I have found a way to accomplish my original goal. Thank-you again for your assistance.

Any chance you can share how you accomplished getting ha to use a warmer white? I’m literally trying to accomplish the same thing, and am stuck trying to change temperature while not Halloween, or Christmas…

I used call service “light: turn on” in the graphical interface and set the Color Temperature to 2600.