cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Automation w/ Script Editor (Nest Thermostat)

JTOUPS1214
Community Member

I'm looking for help creating a custom automation in script editor.   I'd like to enable a smart plug to turn on every time my Nest Thermostat is running/cooling.


Long story short, i have an HVAC scent diffuser.  I want it to power on via the smart plug, once my Nest Thermostat is cooling the home.

 

Using the default "starters" in the Google home app,  I'm almost able to do this.   But the only mode is Cool.   I can't use this mode because this system is always set to Cool.   Basically i need the option when it's actually running. (cooling.)

 

5 REPLIES 5

JTOUPS1214
Community Member

I would need an option that would say "cooling", which would indicate when the Nest theromstat is actually pushing out cold air.    (Photoshopped pic as an example)

Untitled.png

PrantlMarkus
Community Member

Hi,

i dont use the nest thermostat but what happens if you use the startet device.state.onoff?

not the mode change as a starter?

 

Greets from Tyrol

Markus

Markus Prantl

I'll try that, but I'm not 100% sure how to type the entire correct code in the script editor 

PrantlMarkus
Community Member

Please don´t copy paste this code because the spacebars i think are false 😉

 

metadata:
name: Thermostat-SmartOutlet

description: Turn the outlet on if the thermostat is on

automations:
starters:
  - type: device.state.OnOff

  state: on

  device: Thermostat

actions:
- type: device.command.OnOff 
  on: true
  devices: SmartOutlet

Markus Prantl

Thank you 🙏