Need help with ESP weather station code (Novice in code)

I have a weather station with inputs N,E,S,W, and windspeed, when the speed = 0 I want below sensor in configuration.yaml to display NO-WIND and display other options if there is.
What am I doing wrong in the code ? line {% if (‘sensor.velocita_del_vento’) == 0 %}
Below is the pulse_counter for the windspeed

  • platform: pulse_counter
    pin: 19
    unit_of_measurement: ‘mph’
    name: ‘Velocità del vento’
    filters:
    - multiply: 0.081
    update_interval: 5s
    sensor:
- platform: template
  sensors:
    direzione_vento:
      friendly_name: Wind direction
      value_template: >-
      
        {% if ('sensor.velocita_del_vento') == 0 %}
        NO-WIND
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' and states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH-WEST
        {% elif states('binary_sensor.vento_direzione_est') == 'on' and states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH-EAST
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' and states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH-WEST
        {% elif states('binary_sensor.vento_direzione_est') == 'on' and states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH-EAST
        {% elif states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH
        {% elif states('binary_sensor.vento_direzione_est') == 'on' %}
        EAST
        {% elif states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' %}
        WEST
        {% endif %}

# Cardinal Wind direction
text_sensor:
  - platform: template
    name: Cardinal Wind Direction
    lambda: |-
      if (id(winddirection1).state < 22.5 || id(winddirection1).state >= 337.5) {
        return {"N"};
      } else if (id(winddirection1).state >= 22.5 && id(winddirection1).state < 67.5) {
        return {"NE"};
      } else if (id(winddirection1).state >= 67.5 && id(winddirection1).state < 112.5) {
        return {"E"};
      } else if (id(winddirection1).state >= 112.5 && id(winddirection1).state < 157.5) {
        return {"SE"};
      } else if (id(winddirection1).state >= 157.5 && id(winddirection1).state < 202.5) {
        return {"S"};
      } else if (id(winddirection1).state >= 202.5 && id(winddirection1).state < 247.5) {
        return {"SW"};
      } else if (id(winddirection1).state >= 247.5 && id(winddirection1).state < 292.5) {
        return {"W"};
      } else if (id(winddirection1).state >= 292.5 && id(winddirection1).state < 337.5) {
        return {"NW"};
      } else return {"Something is not Right..."};
    update_interval: 1s


sensor:
  - platform: wifi_signal
    name: ${upper_devicename} WiFi Signal Sensor
    update_interval: 600s

  - platform: pulse_meter
    pin: GPIO16
    unit_of_measurement: 'Knts'
    name: "Wind Base"
    id: wind
    internal_filter: 13us
    internal_filter_mode: edge
    accuracy_decimals: 0
    icon: 'mdi:weather-windy'
    filters:
      - filter_out: nan
      - throttle_average: 1s
#      - max:
#          window_size: 3
#          send_every: 1
#      - sliding_window_moving_average:
#          window_size: 30
#          send_every: 10
      - multiply: 0.0325866
      - calibrate_linear:
          - 0.0 -> 0.0
          - 5.0 -> 7.0
          - 8.0 -> 10.0
          - 10.0 -> 13.0
          - 15.0 -> 19.0          
          - 20.0 -> 25.0
          - 25.0 -> 31.0          

Thank you found a solution to my code, now when wind is low there is no point to wind direction as its unstable at low or no wind and not true in direction.

sensor:
- platform: template
  sensors:
    direzione_vento:
      friendly_name: Wind direction
      value_template: >-
      
        {% if is_state('sensor.velocita_del_vento','0.00') %}
        LOW-WIND
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' and states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH-WEST
        {% elif states('binary_sensor.vento_direzione_est') == 'on' and states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH-EAST
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' and states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH-WEST
        {% elif states('binary_sensor.vento_direzione_est') == 'on' and states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH-EAST
        {% elif states('binary_sensor.vento_direzione_nord') == 'on' %}
        NORTH
        {% elif states('binary_sensor.vento_direzione_est') == 'on' %}
        EAST
        {% elif states('binary_sensor.vento_direzione_sud') == 'on' %}
        SOUTH
        {% elif states('binary_sensor.vento_direzione_ovest') == 'on' %}
        WEST
        {% endif %}