Template rendered an invalid service 'light.turn_on'

Hi,

Trying to configure rhasspy, I’m getting a strange error on my intent script :

Intent Script ChangeLightState: Error executing script. Error for call_service at pos 1: Template rendered invalid service: ‘light.turn_on’

Of course light.turn_on is a valid service, and it doesn’t look like there’s any weird characters between these quotes. What could I be missing ?

ChangeLightState:
  speech:
    text: Changing state
  action:
    - service_template: >
        {% set split = name.split('.') %}
        '{{ split[0] }}.turn_{{ state }}'
      data_template:
        entity_id: '{{ name }}'

Thanks

Nevermind, looking at it fresh today it’s obvious, the problem isn’t between the quotes, it’s the quotes.
I assumed the quotes in the error were added by HA for the log, but no it’s actually trying to call ‘light.turn_on’. Removed the quotes, that fixed it