cancel
Showing results for 
Search instead for 
Did you mean: 

Can Automation make my ceiling fan turn on when the Nest Thermostats turns on the Heat?

EmptyNester
Silver Product Expert
Silver Product Expert

Hello everyone,  I want to do something that seems simple but I'm overwhelmed by how the automation programming works.

All I need is when my Nest Thermostats turns ON the Heat in the house that my living room ceiling fan (in Smart Things) turns ON.  Then when the heat turns OFF the fan turns off.

Is this relatively easy to do?

2 Recommended AnswerS

ImNotANestUser
Community Member

In theory it should be easy...

  1. In the google home app, go to the automations section.
  2. Click the + sign to add a new automation.
  3. Select 'Household'  (Personal routines cannot be started from device activity)
  4. Click "+ Add starter"
  5. Click "When a device does something"
  6. Hopefully, you'll see the Nest Termostat.  Click on it and you'll see the options you have for starting the routine.  Note: These are the only choices you have, if none of them are satisfactory I'm afraid you're out of luck.  Assuming things are okay, continue with step 7.
  7. Click 'Add starter'
  8. Click "+ Add Action'
  9. Click "Adjust Home Devices"
  10. Click on your fan and set it to turn on.
  11. Click "Add action"
  12. Add the top, you'll see the name of your automation (for a new automation it should be called "Untitled"
  13. Click on the pencil icon and give you automation a better name.
  14. Click "Save"

I know this seems like a lot but once you get the hang of it, it goes pretty fast.

Good luck!

View Recommended Answer in original post

What is it about the error you don't understand? What is it about the error you do understand?
Please pay very close attention to spacing (text that is in blue) and device settings/names (text that is in green). In my situation, I'm turing on two different fans, that is why there is two "- type:" in the actions section. You need to customize the code for your device names and your situation. When requesting help, please explain what you have tried, what documentation you read, what lines in the documentation you thought was useful. We all have the ability to type in simple text, especially with Googles built in code suggestions. If there are terms you don't understand (i.e. spacing or indention), search for a response, often times the answer is only one search away.
youngkrs_0-1737652274048.png

 

View Recommended Answer in original post

9 REPLIES 9

ImNotANestUser
Community Member

In theory it should be easy...

  1. In the google home app, go to the automations section.
  2. Click the + sign to add a new automation.
  3. Select 'Household'  (Personal routines cannot be started from device activity)
  4. Click "+ Add starter"
  5. Click "When a device does something"
  6. Hopefully, you'll see the Nest Termostat.  Click on it and you'll see the options you have for starting the routine.  Note: These are the only choices you have, if none of them are satisfactory I'm afraid you're out of luck.  Assuming things are okay, continue with step 7.
  7. Click 'Add starter'
  8. Click "+ Add Action'
  9. Click "Adjust Home Devices"
  10. Click on your fan and set it to turn on.
  11. Click "Add action"
  12. Add the top, you'll see the name of your automation (for a new automation it should be called "Untitled"
  13. Click on the pencil icon and give you automation a better name.
  14. Click "Save"

I know this seems like a lot but once you get the hang of it, it goes pretty fast.

Good luck!

Thank you so much for the reply.   Yes, it looks easy.   Unfortunately I got stuck at #6 as it doesn't offer the choice of when heat actually turns on/off.    It only offers "Mode Change" which is when the Mode of the thermostats is changed from heating to cooling or OFF or ECO, etc.   It also lets me choose when certain temperates are met.  But that isn't quite what I'm looking for.

I will send them some Feedback requesting this change.

 

Nest not showing 

Here is the code to do this successfully - There are two automations. One to turn on fan(s) based on heating or cooling. The other turns fan(s) off. A third automation can be added in between the automations to change the speed of the fans to the desired strength.

metadata:
name: Start Nest Heat or Cool - Turn on fan 

automations:
# ---- STARTERS ---- #
starters:
- type: device.state.TemperatureSetting 
   state: activeThermostatMode
   is: heat
   device: Nest - Hallway 
- type: device.state.TemperatureSetting 
   state: activeThermostatMode
   is: cool
   device: Nest - Hallway 

# ---- CONDITIONS ---- #
#condition:
#type: device.state.TemperatureSetting # For devices that support temperature points and modes.

# ---- ACTIONS ---- #
actions:
- type: device.command.OnOff
  on: true
  devices: Master Bedroom Fan - Master Bedroom
- type: device.command.OnOff 
  on: true
  devices: 72' Artiste Fan - Living room

 

To Turn off the fan when not actively heating or cooling

metadata:
name: End Heat or Cool - Turn off fans 

automations:
# ---- STARTERS ---- #
starters:
- type: device.state.TemperatureSetting 
   device: Nest - Hallway
   state: activeThermostatMode
   isNot: heat

# ---- CONDITIONS ---- #
condition:
type: or   #checks if either is on, then turn off
conditions:
- type: device.state.OnOff 
   state: on
   is: true
   device: Master Bedroom Fan - Master Bedroom
- type: device.state.OnOff 
   state: on
   is: true
   device: 72' Artiste Fan - Living room

# ---- ACTIONS ---- #
actions:    #turn off the following fans
- type: device.command.OnOff 
   on: false
   devices: Master Bedroom Fan - Master Bedroom
- type: device.command.OnOff 
   on: false
   devices: 72' Artiste Fan - Living room

 

Here is the documentation to help you customize your own script: https://developers.home.google.com/cloud-to-cloud/traits/temperaturesetting

For additional context here is a snippet from the Automation log. I've bolded the key value for the active_thermostat_mode. active_thermostat_mode will be "heat" or "cool" for only a moment when the HVAC system switches from "heat mode but furnance not on" to "heat mode now furnance is on". After those first few seconds, the value of active_thermostat_mode will be "none". Therefore the "isNot": heat is the key to getting the fan or switch to turn off. Luckily the webhook call from Nest back to Google Home doesn't happen every 15 seconds, but only listens for database state changes. 

 
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/thermostat_mode] [string_value: "heat"].
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/thermostat_temperature_setpoint] [float_value: 20.555555].
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/thermostat_temperature_ambient] [float_value: 20.919998].
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/thermostat_humidity_ambient] [float_value: 39.5].
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/active_thermostat_mode] [string_value: "none"].
[INFO] Automation started by: [Nest] because [home.graph.traits.TemperatureSetting/target_temp_reached_estimate_unix_timestamp_sec] [long_value: 0].

EmptyNester
Silver Product Expert
Silver Product Expert

This is excellent!  Thank you so much.  I will give it a try tomorrow.  Hopefully I can get it to work.  I will let you know.

EmptyNester
Silver Product Expert
Silver Product Expert

Hello, I'm getting an error that I just can't figure out and hoping you can help.  I'm still very new to this script language.

actions:
- type: device.command.OnOff
on: true
devices: Master Bedroom Fan - Master Bedroom
- type: device.command.OnOff    <------ error (below) on this line.

Invalid YAML syntax. These are sometimes indentation errors. Please visit this link to learn more about YAML

What is it about the error you don't understand? What is it about the error you do understand?
Please pay very close attention to spacing (text that is in blue) and device settings/names (text that is in green). In my situation, I'm turing on two different fans, that is why there is two "- type:" in the actions section. You need to customize the code for your device names and your situation. When requesting help, please explain what you have tried, what documentation you read, what lines in the documentation you thought was useful. We all have the ability to type in simple text, especially with Googles built in code suggestions. If there are terms you don't understand (i.e. spacing or indention), search for a response, often times the answer is only one search away.
youngkrs_0-1737652274048.png

 

EmptyNester
Silver Product Expert
Silver Product Expert

Thanks for the extra info. I got it figured out and all is working now.  

Best Regards,

Glad it worked out. Do you mind marking my response as the recommended answer?