cancel
Showing results for 
Search instead for 
Did you mean: 

Start and Stop a room fan(smart plug) when Nest thermostat starts and stops cooling

GN2p
Community Member

I'm looking for a set up a  Automation/Routine to have a room fan (Not the Air handler fan) fan start via smart  plug (this plug is set up and working in Google Home) when cooling starts from the Nest thermostat.  Similarly to have this room fan stop when cooling stops or stops after a set amount of time 5-15mins. 

I For starters of my Nest Thermostat there is "Mode changes to: "    I thought this would be the ticket but alas the mode is not changning when cooling comes on and off.  The thermostat is still in cooling "mode" whether the cooling is active or not. 

The other starter available for the thermostat is temperature but this does not meet my scenarios since the cooling may turn on and off at different temps depending on Temperature presets the thermostat is currently operation in.  ie.  Day, Away , Sleep

I'm doing this in the Android Google Home app. 

If anyone has any other clever ideas I might obtain the intended results I'd like to hear it. 

I also wonder if there are other starter options available be in Google Home for web script editor that is currently in Public Preview. 

https://support.google.com/googlenest/answer/13323253?visit_id=638266077660237803-381182716&p=script...

Thanks in adavance


3 REPLIES 3

GBD
Bronze
Bronze

This can be done but you'll have to use the yaml scripting editor at home.google.com

GN2p
Community Member

Thanks for the reply  @GBD.  I did start to tinker in script editor.  I'll have to do some testing and see if I can get it working as intended but good to know if someone else thinks this should be possible.  

I may reply with my solution or if I run into any questions that you or others might be able to help me with. 

You're welcome @GN2p. The specific starter that you'll be looking for would look like this.

starters:
  - type: device.state.TemperatureSetting 
     state: activeThermostatMode
     is: cool
     device: xxxx - xxxxxxx

You can use the same script to both start and stop your fan, you just need to be careful of your indentations in the script. For turning the fan off the is: would be replaced with isNot:

Here is the script that I use to control cooling and humidity using a portable and window ac unit.

metadata:
name: Climate Control
description: Unified script for controlling portable/window AC temperature and humidity

automations:
- starters:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: activeThermostatMode
is: cool
device: Zone 1 - Dining Room

actions:
- type: assistant.command.OkGoogle
okGoogle: activate scene AC1 power on
devices: Den Mini - Den

- type: device.command.OnOff # Turn the device on or off.
on: true
devices: Geeni Switch 1 - Living Room

- starters:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: activeThermostatMode
isNot: cool
device: Zone 1 - Dining Room

actions:
- type: assistant.command.OkGoogle
okGoogle: activate scene AC1 power off
devices: Den Mini - Den

- type: device.command.OnOff # Turn the device on or off.
on: false
devices: Geeni Switch 1 - Living Room

- starters:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: thermostatHumidityAmbient
greaterThan: 60
device: Zone 1 - Dining Room
for: 5min
suppressFor: 30 min

condition:
type: and
# "AND" together two or more conditionals
conditions:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: activeThermostatMode
isNot: cool
device: Zone 1 - Dining Room
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: thermostatMode
is: cool
device: Zone 1 - Dining Room

actions:
- type: assistant.command.OkGoogle
okGoogle: activate scene AC1 dehumidify
devices: Den Mini - Den

- starters:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: thermostatHumidityAmbient
lessThan: 58
device: Zone 1 - Dining Room

condition:
type: and
# "AND" together two or more conditionals
conditions:
- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: activeThermostatMode
is: cool
device: Zone 1 - Dining Room

- type: device.state.TemperatureSetting # For devices that support temperature points and modes.
state: thermostatMode
is: cool
device: Zone 1 - Dining Room

actions:
- type: assistant.command.OkGoogle
okGoogle: activate scene AC1 off
devices: Den Mini - Den