Help with service_template (SOLVED)

Bracket is in the wrong place, should be

{% if is_state('light.kitchen_lights' , 'on') %}

oh, thanks a lot, Marc!
This Jinja syntax is crazy. I wish we could use simple python.

You can use appdaemon if you want to speak to homeassistant in python.

The OP question might also be an indentation issue.
I had the same problem, and was fixed by adding 2 spaces to beginning of the equivalent of these lines:

  {% if is_state('binary_sensor.door_window_sensor_158d0001fd55d5', 'on') %}
  rest_command.set_climate_to_on
  {% elif is_state('binary_sensor.door_window_sensor_158d0001fd55d5', 'off') %}
  climate.set_operation_mode

I have this script but keep getting error: String does not match the pattern of “DEPRECATED”

script:
  rainbird_irrigate:
    sequence:
      - service_template: >
          {% if is_state('input_boolean.zone1', 'on') %}
            script.rainbird_zone1
          {% elif is_state('input_boolean.zone2', 'on') %}
            script.rainbird_zone2
          {% elif is_state('input_boolean.zone3', 'on') %}
            script.rainbird_zone3
          {% elif is_state('input_boolean.zone4', 'on') %}
            script.rainbird_zone4
          {% endif %}

change service_template to service