Setting HVAC status to OFF automation

Why this automation is not rumnning?

trigger:
  - platform: numeric_state
    entity_id:
      - sensor.sonoff_snzb_02d_temperature
    for:
      hours: 0
      minutes: 0
      seconds: 30
    above: sensor.t_h_sensor_temperature
condition:
  - condition: device
    device_id: <Some_id>
    domain: climate
    entity_id: <Some_id>
    type: is_hvac_mode
    hvac_mode: cool

condition is fulfilled:
image

First, make sure you understand, generally, how the trigger functions.

One detail of numeric state triggers using an entity to define above or below that many new users misunderstand is how each entity affects the function of the trigger. In your example, only changes to the Sonoff sensor will ever cause the trigger to fire. The other sensor changing to a value below the Sonoff’s, will not trigger the automation.

If that is what you need, a Template trigger is a better fit:

trigger:
  - platform: template
    value_template: |
      {{states('sensor.sonoff_snzb_02d_temperature') |float(0) > 
      states('sensor.t_h_sensor_temperature') |float(0) }}
    for:
      seconds: 30
1 Like