How to remove quotes in script

I made this script

‘’’
alias: ‘Switch : Airco togglen’
sequence:

  • service: climate.turn_"{{ states(‘binary_sensor.airco_gang_is_on’) }}"
    target:
    entity_id: ‘{{ entity_id }}’
    description: Set airco on/off
    fields:
    on_off:
    description: The status of the aircon
    default: ‘on’
    example: ‘off’
    entity_id:
    description: The climate entity you want to control
    default: climate.airco_gang
    example: climate.airco_gang
    mode: single
    ‘’’
    Must been simple, but the service is translated with the quotes, so climate.turn_“on”

How do I have to modifiy this ?

just delete the quotes…? :man_shrugging:

service: climate.turn_{{ states(‘binary_sensor.airco_gang_is_on’) }}

I had a bad day yesterday… :upside_down_face:

Found another way without using the binary_sensor

alias: 'Switch : Airco togglen'
sequence:
  - service: |
      {% if (not is_state( entity_id, 'off')) %} 
        climate.turn_off
      {% else %}
        climate.turn_on
      {% endif %}
    target:
      entity_id: '{{ entity_id }}'
description: Set airco on/off
fields:
  entity_id:
    description: The climate entity you want to control
    default: climate.airco_gang
    example: climate.airco_gang
mode: single