Battling to read value and trigger automation

I have an entity: sensor.roof_temperature that has the below fields:

state_class: measurement
unit_of_measurement: °C
device_class: temperature
friendly_name: Roof Temperature

Its current state is 38 i.e. the roof temp is 38 degrees C.

I have created the below automation but am obviously not understanding something as it does not run.

alias: "Environment: turn off HRV when temp above 25"
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.roof_temperature
    above: 25
conditions: []
actions:
  - action: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.hrv
mode: single

When the temperature is above 25, the HRV should switch off.

The value has to go from below to above 25 for a numeric state trigger.

2 Likes

Just to clarify a bit more…

all triggers have to go from false to true in order to fire.

if it’s already true (temp is already above 25 in your example) then it won’t fire until it goes to false then to true (back below 25 then above 25 again)

1 Like

Thanks both, that makes sense. Yes it was already above 25 degrees.

So it is working :slight_smile: