вот, например кусок для 1 потолочного филлипа кухонного:
- service: script.turn_on
data_template:
entity_id: >-
{%- if states("sensor.kitchen_philips_dl1") | int == 1 -%}
script.kitchen_philips_dl1_tv
{%- elif states("sensor.kitchen_philips_dl1") | int == 2 -%}
script.kitchen_philips_dl1_warm
{%- elif states("sensor.kitchen_philips_dl1") | int == 3 -%}
script.kitchen_philips_dl1_midnight
{%- else -%}
script.kitchen_philips_dl1_bright
{% endif %}