Scenes and templates

Hi All,

I’m trying the scene option to turn on or off lights with brightness or some other info.
is it possible to use " {{ … }}" in scenes?
I tried this:

- name: "Evening Default"
  icon: "mdi:flower-tulip"
  entities:
    light.livingroom_all:
      state: "on"
      brightness_pct: 100
      kelvin: "{{ states('sensor.adaptive_lighting_color_temperature')| round(0) }}"
    light.balcony_all:
      state: "on"
      brightness_pct: 100
      effect: 0
    light.dressoir_all:
      state: "on"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"

- name: "Evening Christmas"
  icon: "mdi:flower-tulip"
  entities:
    light.livingroom_all:
      state: "on"
      brightness_pct: 100
      kelvin: "{{ states('sensor.adaptive_lighting_color_temperature')| round(0) }}"
    light.dressoir_all:
      state: "on"
      color_name: "blue"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_2:
      state: "on"
      color_temp: 153
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.balcony_all:
      state: "on"
      brightness_pct: 100
      effect: 0
    group.xmas_zwave:
      state: "on"

- name: "Evening Halloween"
  icon: "mdi:flower-tulip"
  entities:
    light.livingroom_all:
      state: "on"
      brightness_pct: 100
      kelvin: "{{ states('sensor.adaptive_lighting_color_temperature')| round(0) }}"
    light.dressoir_all:
      state: "on"
      color_name: "blue"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_2:
      state: "on"
      color_name: "purple"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.balcony_all:
      state: "on"
      brightness_pct: 100
      effect: 0

- name: "Evening Kingsday"
  icon: "mdi:flower-tulip"
  entities:
    light.livingroom_all:
      state: "on"
      brightness_pct: 100
      kelvin: "{{ states('sensor.adaptive_lighting_color_temperature')| round(0) }}"
    light.dressoir_1:
      state: "on"
      color_name: "red"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_2:
      state: "on"
      color_temp: 153
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_3:
      state: "on"
      color_name: "blue"
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.balcony_all:
      state: "on"
      brightness_pct: 100
      effect: 0

- name: "Evening Birthday"
  icon: "mdi:flower-tulip"
  entities:
    light.livingroom_all:
      state: "on"
      brightness_pct: 100
      kelvin: "{{ states('sensor.adaptive_lighting_color_temperature')| round(0) }}"
    light.dressoir_1:
      state: "on"
      effect: 0
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_2:
      state: "on"
      effect: 0
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.dressoir_3:
      state: "on"
      effect: 0
      brightness_pct: "{{ 0 if is_state(door_sensor_diningroom, 'on') else 100 }}"
    light.balcony_all:
      state: "on"
      brightness_pct: 100
      effect: 0

If you want to use templates then you will have to use scripts instead of scenes.

Thanks Tom!