Nest Fan Script

Hi there

I’m looking for a hand with automating my Nest in a script.

Here is what I have:

script:
  fan_off_timer:
    sequence:
      - delay:
          minutes: 30
      - service: climate.set_fan_mode
        data:
          entity_id: climate.entryway
          fan_mode: 'auto'

  fan_off_now:
    sequence:
      - service: climate.set_fan_mode
        data:
          entity_id: climate.entryway
          fan_mode: 'auto'
          
  fan_on:
    sequence:
      - service: climate.set_fan_mode
        data:
          entity_id: climate.entryway
          fan_mode: 'on'
      - service: script.turn_on
        data:
          entity_id: script.fan_off_timer

For some reason, I the fan doesn’t run. I’ve also tried to enable the fan with Nest but that always fails for me.

fan:
  - platform: nest

Thank you for your help

Sorry, don’t mean to resurrect an old thread, but I was looking for the same and figured it out on my own. I wanted a script (or scripts) to invoke, rather than just an automation; for those who follow, see working config below:

script:
  nest_fan_on:
    alias: Nest Fan On
    sequence:
      - service: climate.set_fan_mode
        entity_id: climate.hallway_nest
        data:
          fan_mode: 'on'
  nest_fan_off:
    alias: Nest Fan Off
    sequence:
      - service: climate.set_fan_mode
        entity_id: climate.hallway_nest
        data:
          fan_mode: 'auto'

switch:
  - platform: template
    switches:
      nest_fan:
        friendly_name: "Nest Fan"
        value_template: "{{ is_state('Nest Fan', 'on') }}"
        turn_on:
          service: script.turn_on
          entity_id: script.nest_fan_on
        turn_off:
          service: script.turn_on
          entity_id: script.nest_fan_off
1 Like

Ranunculales. Does your fan remain on until you manually turn it back to auto? I have a similar automation but my Nest reverts back to auto after thirty minutes.

The Nest API has a fan duration setting but the HA climate service does not. I suspect Nest or HA is defaulting to a 30 minute duration, but I have no way to change it.

I’m looking at this right now too. It looks like HA may only have the ability to turn the fan “on” and off (“auto”) but I have found in the Google nest docs that there is a setTimer function in the nest API that allows someone to POST a runtime to the thermostat.