Need help with automation created in GUI

I have two temperature sensors and created a third one using Helper: Combine the state of several sensors, Statistical range. So it gives temperature difference between Sensor 1 and 2.
The idea is to turn Attic Fan when difference above 3C. But it does not fire.
I see the sensor.status_temperature_attic_garage_delta reports 4C
But the Fan is still OFF?

alias: Attic Fan
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.status_temperature_attic_garage_delta
    for:
      hours: 0
      minutes: 2
      seconds: 0
    above: 3
conditions: []
actions:
  - type: turn_on
    device_id: 055ff299bcb8c1c6bd1df5d8518e13f1
    entity_id: 46016ef65d1dcde284aefde88efb4642
    domain: switch
  - if:
      - condition: sun
        after: sunset
    then:
      - type: turn_off
        device_id: 055ff299bcb8c1c6bd1df5d8518e13f1
        entity_id: 46016ef65d1dcde284aefde88efb4642
        domain: switch
    enabled: true
mode: single

Was it above 3 when you wrote the automation?

The trigger only occurs when the sensor value goes from below 3 to above 3.

Yes. It was above 3C Still learning :). Thank you!

I used this Helper. And it is not working right for my application. As implied it gives Statistical range vs. I need just actual difference.
What would be suitable Helper to find just difference between two numbers (temperature sensors in my case)?
I’m reading about templates, but I’m not ready to venture there yet…
Thank you.

Should you ever change your mind about not willing to “venture there yet”, create a Template Sensor helper, give it a name, then copy-paste this template into its “State template” field:

{{ states('sensor.temp1') | float(0) - states('sensor.temp2') | float(0) }}

In the template, replace sensor.temp1 and sensor.temp2 with the entity_ids of your temperature sensors.

Save the new Template Sensor.

If you named it “Temperature Difference”, its entity_id will be sensor.temperature_difference and will be available for use elsewhere in Home Assistant (dashboard card, script, automation, etc). Its value will be automatically recalculated every time the value of either of the two sensors changes.

Privet, Taras, thank you.
I did it by adding this code in config.yaml. Is this correct way? Or I should create this sensor in a separate yaml (still learning)? By the way just to note that by reloading yamls from Dev tools the sensor was not there until HA restart. Expected?

template:
  - sensor:
      - name: "Status Temperature Attic Garage diff"
        unit_of_measurement: "°C"
        state: >
          {% set attic = states('sensor.garage_attic_status_temperature_attic') | float %}
          {% set garage = states('sensor.garage_attic_status_temperature_garage') | float %}
          
          {{ ((attic - garage)) | round(1, default=0) }}