How often does HA check the occurrence of an event? Once a second? Once a minute? Once an hour??
I am attempting to write an automation such as this: Let R be a temperature range, as measured by a sensor S. I need to make sure that fan switch F is OFF when S’s temperature is within range R, and ON outside the range R. I am having trouble figuring out the “events” that should trigger the action of switching F ON or OFF. The automations that I wrote go something like this:
- id: '1710619708422'
alias: Gabe's fan ON
description: ''
trigger:
- type: temperature
platform: device
device_id: cce31f7baee6b00cedc9178847d7c01e
entity_id: 5cf1a7f469c5fee78ef19b2becd6b634
domain: sensor
above: 21
below: 18
condition: []
action:
- type: turn_on
device_id: 6005320f572f169d9ae6e355455a8163
entity_id: d13dbbf26106c1d40ebdc1917b65a0e0
domain: switch
mode: single
- id: '1710619834762'
alias: Gabe's fan OFF
description: ''
trigger:
- type: temperature
platform: device
device_id: cce31f7baee6b00cedc9178847d7c01e
entity_id: 5cf1a7f469c5fee78ef19b2becd6b634
domain: sensor
above: 18
below: 21
condition: []
action:
- type: turn_off
device_id: 6005320f572f169d9ae6e355455a8163
entity_id: d13dbbf26106c1d40ebdc1917b65a0e0
domain: switch
mode: single
… though, to be entirely honest, I am not sure what the triggering “events” are in this. Is it that HA checks the temperature every second, and switches F OFF when it is within R, and ON when it finds it outside R? Does this action happen every second (or however often HA checks the temperature)???