Template condition

i’m sorry, i’m new of Home assistant and i don’t understand how does it work a template on condition in my automation rule.
I have a Set Point and a sensor of temperature. I want that when the sensort temperature will be going to the set point a device turned off.
I write this rule:

alias: Risc-Nonna. OFF
description: ""
  - platform: state
      - sensor.tasmota_ds18b20_temperature_3
    enabled: true
  - condition: template
    value_template: >-
      {{(states('sensor.tasmota_mqtt_connect_count_7') | float)  >
      (states('input_number.set_point') | float )}}
  - type: turn_off
    device_id: faf9e1b02d6dd023097d84191b47b835
    entity_id: switch.tasmota_7
    domain: switch
mode: single

what is wrong???
Tell me please some help…

You likely don’t need a template condition for what you are trying to do.

You have two different sensors in this automation… If sensor.tasmota_ds18b20_temperature_3 is the temperature sensor, and input_number.set_point is the set point, what is sensor.tasmota_mqtt_connect_count_7 for?

Is this an automation for heating, cooling, or both?