HVAC fan on (Nest) when basement is cold

Reviewed several posts here about Nest and fans but didn’t see anything in line to work from. So, trying from scratch here.

My goal is to run our Nest thermostat fan indefinitely if the basement temperature sensor is below 70F. I think something is missing here but I’m a bit lost with it. Additionally, I know Nest has fan modes that run for specific time increments and then it auto shuts off so I don’t know if I need something else in this to keep it running indefinitely or re-sending the fan run command. Input appreciated!

- id: '1122334455667788998877665544332211'
  alias: Under 70 in basement kick on HVAC fan
  trigger: []
  condition:
    - type: is_temperature
      condition: device
      entity_id: sensor.temperature_11
      domain: sensor
      below: 70
  action:
    - service: climate.set_fan_mode
      data:
        fan_mode: "on"

No trigger: nothing’s going to happen. Assuming your action works, this should do the job. Triggers when the temperature drops below 70 or when there’s a restart, condition checks that it’s cold.

- alias: Under 70 in basement kick on HVAC fan
  id: 05543e6c-e667-4111-a382-821b1525d1eb
  trigger:
    - platform: numeric_state
      entity_id: sensor.temperature_11
      below: 70
    - platform: homeassistant
      event: start
    - platform: event
      event_type: automation_reloaded
  condition:
    - condition: numeric_state
      entity_id: sensor.temperature_11
      below: 70
  action:
    - service: climate.set_fan_mode
      data:
        fan_mode: "on"

I’ve used a UUID4 for the id: this tool is good.

Note that there’s no logic here to change the setting when the temperature rises again. Presumably you do that elsewhere?

Awesome tool. It’s been a pain making up ids for everything.

Curiously, any thoughts how to handle a continued use of the fan like to reload this automation every so often? I think Nest will not run the fan indefinitely and so it may turn it off before the basement is above 70.

Add another trigger:

  - platform: state
    entity_id: automation.under_70_in_basement_kick_on_hvac_fan
    attribute: last_triggered
    for:
      minutes: 10

Check the actual entity ID of your automation. The last_triggered attribute is a bit mis-named: it records the last time the action was reached.

So this trigger will re-run the automation every ten minutes until the temperature goes above 70, where the condition will block it.

That’s because it’s one of the two hard problems in computer science:

  • cache invalidation
  • naming things
  • off-by-1 errors.

Okay, so I erred in the action part so pasting this for anyone else searching for this similar issue in re Nest thermostat fans.

- alias: Under 70 in basement kick on hvac fan
  id: 05543e6c-e667-4111-a382-821b1525d1eb54
  trigger:
    - platform: numeric_state
      entity_id: sensor.temperature_11
      below: 70
    - platform: homeassistant
      event: start
    - platform: event
      event_type: automation_reloaded
    - platform: state
      entity_id: automation.under_70_in_basement_kick_on_hvac_fan
      attribute: last_triggered
      for:
        minutes: 10
  condition:
    - condition: numeric_state
      entity_id: sensor.temperature_11
      below: 70
  action:
    - service: climate.set_fan_mode
      target:
        entity_id: climate.entryway
      data:
        fan_mode: "on"

The last part of my puzzle I guess would be this turning off the fan once it it reaches or exceeds the target. Is it better to do like a new automation or add in something here like a wait for trigger maybe like this below?

    - wait_for_trigger:
      - platform: state
        entity_id: sensor.temperature_11
        above: 70
      continue_on_timeout: false
    - service: climate.set_fan_mode
      data:
        fan_mode: "off"

New automation; second best would be an additional trigger and some conditional logic in the action. Much simpler, though, guessing the action part:

- alias: Over 70 in basement turn off hvac fan
  id: ab5da74f-c523-4cdb-ba90-15d977e9d8ef
  trigger:
    - platform: numeric_state
      entity_id: sensor.temperature_11
      above: 70
    - platform: homeassistant
      event: start
    - platform: event
      event_type: automation_reloaded
  condition:
    - condition: numeric_state
      entity_id: sensor.temperature_11
      above: 70
  action:
    - service: climate.set_fan_mode
      target:
        entity_id: climate.entryway
      data:
        fan_mode: "off"

Well, so far so good. There isn’t much in the way of turning that bad boy off. I forgot I had the vents open down there so it got to be an ice box today. So the script keeps cycling every 10 minutes to reinitiate it to keep the fan active. It looks like Nest may actually set a 12 hour window when using its API. Interesting.

Thanks for the help! Looking forward to seeing if this helps vs. having the fan on all the time whether needed or not this summer.

@Troon I know this is a bit stale, but curious if you know anything about a condition that the fan_mode is off so it doesn’t initiate this again if the fan is already on. This would keep from resetting the Nest thermostat fan mode timer of the already running fan mode.

Straightforward enough: state condition, perhaps looking at an attribute. I don’t have a fan, so have a look at your climate entity to see where the fan_mode is visible. Something like:

condition:
  - condition: state
    entity_id: climate.entryway
    attribute: fan_mode
    state: "off"

You are a scholar. I owe you a beer for all this help. Happy to send.