A trigger in my automation triggers at least once/second unnecessarily. How can I "slow" this down?

I have a trigger:

trigger:
  - platform: state
    entity_id:
      - sensor.ac_infinity_fan_temperature
    enabled: true

That appears to trigger at least once a second, for whatever reason, most likely because the sensor reports to 1 decimal place, e.g. 72.3 or 19.5 etc. and it fluctuates. This is running on an under-powered CPU so I don’t want HA doing unnecessary work.

Since I’m really just wanting to do the automation actions if the temperature is above or below a value, and I really only need to check this once a minute, how can I get my automation to only check this trigger that often?

I’m assuming that including a "for: 00:00:00: value doesn’t actually stop it from triggering 3 times a second, it just stops the automation from continuing. I’d like it to not even be checking this automation more than once a minute.

trigger:
  - platform: state
    entity_id:
      - sensor.ac_infinity_fan_temperature
    above: 65
    below: 45
    for:
      minutes: 1
    enabled: true

This sets up a listener on the event bus that listens for the limits to be exceeded for a minute, if that happens then the automation is triggered. It does not trigger every time the sensor changes then check the limits/time.

Thanks for that. But I get “extra keys not allowed @ data[‘above’]” if I try to add the above/below lines:

alias: theatre.ventilation
description: turn on extractor fan if room too warm
trigger:
  - platform: state
    entity_id:
      - sensor.ac_infinity_fan_temperature
    enabled: true
    above: 27
    below: 26
    for:
      minutes:1

I use “above” and “below” later in the automation because there are several conditions that determine what needs to happen (if the room is unoccupied and the temperature is above 27, do . If the temperature is below 26 then do "),

alias: theatre.ventilation
description: turn on extractor fan if room too warm
trigger:
  - platform: state
    entity_id:
      - sensor.ac_infinity_fan_temperature
    enabled: true
    above: 27
    below: 26
    for:
      minutes:1
condition: []
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - type: is_temperature
                condition: device
                device_id: 4dcc87076507c36496bd8cc816fd98ba
                entity_id: f254881009175174af08841e6d26de98
                domain: sensor
                above: 27
              - type: is_not_occupied
                condition: device
                device_id: 4cc7fc728ac5b551626ddd068d2b6f1b
                entity_id: 21996a2cf4423aaf311c8768c44cd6c1
                domain: binary_sensor
              - condition: device
                device_id: 4dcc87076507c36496bd8cc816fd98ba
                domain: fan
                entity_id: 976de8a1e0916abe77470ff34e91ffec
                type: is_off
        sequence:
          - service: fan.set_percentage
            data:
              percentage: 40
            target:
              entity_id: fan.ac_infinity_fan_fan
      - conditions:
          - type: is_temperature
            condition: device
            device_id: 4dcc87076507c36496bd8cc816fd98ba
            entity_id: f254881009175174af08841e6d26de98
            domain: sensor
            below: 26
        sequence:
          - service: fan.set_percentage
            data:
              percentage: 20
            target:
              entity_id: fan.ac_infinity_fan_fan
    enabled: true

Sorry, this:

platform: state

Should be:

platform: numeric_state

You should also ave a read of this advice: