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.
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 "),