02-11-2025 12:02 PM
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.)
02-11-2025 12:03 PM - edited 02-11-2025 12:04 PM
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)
02-11-2025 05:09 PM
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
02-11-2025 05:18 PM
I'll try that, but I'm not 100% sure how to type the entire correct code in the script editor
02-11-2025 06:54 PM
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
02-11-2025 06:55 PM
Thank you 🙏