08-06-2023 10:20 PM
I have a Nest thermostat in my basement, I also have a home theater with a vent coming in from the AC unit. The theater is sound proofed so there is no return vent for the AC so I put in a fan that draws the air out of the room into another room. When the AC is on and the fan is on the air circulates just fine...
What I'm trying to do with script editor is automate it so that when the AC comes on the fan also turns on.
I have the fan attached to a Tapo outlet that works find with google home independently of the script.
The script I tried to write does not work and I'm trying to understand why.
Here's the script:
metadata:
name: Scheduled fan
description: Turn the theater fan on when the basement AC Cools
automations:
- starters:
- type: device.state.TemperatureSetting
device: Basement Nest - Basement
state: thermostatTemperatureAmbient
greaterThanOrEqualTo: 69F
conditions:
- type: device.state.TemperatureSetting # Handles temperature points and modes of a thermostat device.
state: thermostatMode
is: cool
device: Basement Nest - Basement
actions:
- type: device.command.OnOff
devices: Theater fan plug - Theater
on: true
any ideas?
08-07-2023 12:28 AM - edited 08-07-2023 12:29 AM
Ok I figured it out, I just changed what starter I was using, much simpler...
here's the revised working code:
metadata:
name: Scheduled fan
description: Turn the theater fan on when the basement AC Cools
automations:
# Turn on fan when AC unit starts to cool
- starters:
- type: device.state.TemperatureSetting
device: Basement Nest - Basement
state: activeThermostatMode
is: cool:
actions:
- type: device.command.OnOff
devices: Theater fan plug - Theater
on: true
# Turn off fan when AC unit turns off.
- starters:
- type: device.state.TemperatureSetting
device: Basement Nest - Basement
state: activeThermostatMode
isNot: cool
actions:
- type: device.command.OnOff
devices: Theater fan plug - Theater
on: false
02-07-2024 09:44 PM - edited 02-07-2024 09:46 PM
I’m not familiar with exactly how to use that? If you could help me out with this I’d really appreciate it
I need to automate a kasa smart plug (hvac in line fan plugged into that) turning on somehow when The nest (air conditioning) turns and when the nest (fan only on ac) turns on
How can I accomplish this?
I did see IFTTT had an applet with nest fan/wemo plug but not for mine…here it is https://ift.tt/wf8Ng4H
But it tells me there’s gotta be a script or coder some way to do it. I just need it in simple language
plz and thanks
08-07-2023 05:35 PM
Thank you! I was actually looking exactly for this kind of script for my Lutron switch for the ceiling fan with my learning thermostat!
08-09-2023 02:56 PM
Glad it helped, I also added some code operate the fan when the heat comes on and off as well... basically just added another starter and action.
It's all been working great so far
Kudos to Google for this feature, looking forward to more improvements to come.
08-10-2023 02:24 PM
Thank you for posting the solution. I was using the ambient temperature with greaterThan/lessThan with limited success. This fixed so many frustrations during the heatwave!