Variable action data?

I have the following automation:

- id: a1
  alias: wa1
  trigger:
  - platform: event
    event_type: rfxtrx_event
    event_data:
      id_string: "18:1"
  action:
  - service_template: light.turn_{{ trigger.event.data["values"].Command }}
    data:
      entity_id: light.rgb_light1

Sometimes the day before the light was dimmed and blue. But when switching it on, I always want it white and bright. So I want “kelvin: 5000” and “brightness: 255” as a parameter.
But kelvin: and brightness: is only possible when switching the light on, not when switching it off. How can I do that?

add an action turning it white before calling turn_off?

Solution:

  - service_template: light.{{ "toggle" if trigger.event.data["values"].Command|upper=="OFF" else "turn_on" }}
    data:
      entity_id: light.awox_tlsr82xx_wzdecke_west
      brightness: 255
      kelvin: 5000