kitchen_hob_cct:
  alias: Steuere Kochfeldlicht CCT
  mode: parallel
  fields:
    brightness:
      description: Zielhelligkeit (0–255)
      example: "180"
    color_temp:
      description: Farbtemperatur in Mired (153–370)
      example: "270"
  sequence:
    - variables:
        brightness: "{{ brightness | default(255) | int }}"
        color_temp: "{{ color_temp | default(370) | int }}"
        ratio: "{{ ((color_temp - 153) / (370 - 153)) | float }}"
        ww: "{{ (brightness * ratio) | round(0) | int }}"
        cw: "{{ (brightness * (1 - ratio)) | round(0) | int }}"
    - action: light.turn_on
      target:
        entity_id: light.kitchen_hob_ww
      data:
        brightness: "{{ ww }}"
    - action: light.turn_on
      target:
        entity_id: light.kitchen_hob_cw
      data:
        brightness: "{{ cw }}"
