cancel
Showing results for 
Search instead for 
Did you mean: 

HVAC Whole Home Scent Diffuser- Script Editior

azmavhockey3
Community Member

Hello, 

I was successful at Automating my SmartSwitch to turn on when the AC Kicks on and off (Attached). I wish to automate for the "Fan- Only" setting on my NEST thermostat.

Im getting an error [fan-only] is an invalid enum string. The list of valid enums: [on, off, heat, cool, heatcool]. When i check the Nest Developer page it states that "Fan-Only" should be a command. Any help would be appreciated. 

https://developers.home.google.com/cloud-to-cloud/traits/temperaturesetting

metadata:
name: Lights ON when Fan-Only runs
description: If the thermostat is actively in fan-only mode, turn ON SmartSwitch
automations:
- starters:
- type: device.state.TemperatureSetting
device: Hallway - Hallway
state: activeThermostatMode
is: fan-only
actions:
- type: device.command.OnOff
devices:
-  SmartSwitch
on: true
[fan-only] is an invalid enum string. The list of valid enums: [on, off, heat, cool, heatcool]

 

To turn on smart switch when AC kicks on: 

metadata:
name: Scent diffuser ON when AC is cooling
description: If the thermostat is actively cooling, turn ON SmartSwitch
automations:
- starters:
- type: device.state.TemperatureSetting
device: Hallway - Hallway
state: activeThermostatMode
is: cool
actions:
- type: device.command.OnOff # Turn the device on or off.
devices:
- SmartSwitch
on: true

To Turn off With AC off: 

metadata:
name: Scent OFF when AC stops
description: When cooling ends (idle), turn OFF SmartSwitch.
automations:
- starters:
- type: device.state.TemperatureSetting
device: Hallway - Hallway
state: activeThermostatMode
isNot: cool
actions:
- type: device.command.OnOff
devices:
- SmartSwitch
on: false

1 Recommended Answer

Suc_dpe
Solutions Expert
Solutions Expert

Hello,

The issue is that "fan-only" isn't a valid value for the activeThermostatMode state in Google Home automations.

According to the documentation you linked, the valid values for activeThermostatMode are:

  • on
  • off
  • heat
  • cool
  • heatcool

"Fan-only" is a thermostat mode that exists on the device itself, but it's not exposed as a triggerable state in the Google Home automation system.

Workaround options:

  1. Use a different automation trigger: Instead of triggering on the thermostat mode, create a schedule-based automation or use a manual trigger
  2. Check if your thermostat exposes fan state separately: Some thermostats have a separate fan control trait. Check if your Nest thermostat shows fan status as a separate device state you could trigger on

Unfortunately, this is a limitation of the current Google Home automation system - not all thermostat modes are available as automation triggers. Your automation syntax is correct; the platform just doesn't support that particular mode value.

View Recommended Answer in original post

2 REPLIES 2

Suc_dpe
Solutions Expert
Solutions Expert

Hello,

The issue is that "fan-only" isn't a valid value for the activeThermostatMode state in Google Home automations.

According to the documentation you linked, the valid values for activeThermostatMode are:

  • on
  • off
  • heat
  • cool
  • heatcool

"Fan-only" is a thermostat mode that exists on the device itself, but it's not exposed as a triggerable state in the Google Home automation system.

Workaround options:

  1. Use a different automation trigger: Instead of triggering on the thermostat mode, create a schedule-based automation or use a manual trigger
  2. Check if your thermostat exposes fan state separately: Some thermostats have a separate fan control trait. Check if your Nest thermostat shows fan status as a separate device state you could trigger on

Unfortunately, this is a limitation of the current Google Home automation system - not all thermostat modes are available as automation triggers. Your automation syntax is correct; the platform just doesn't support that particular mode value.

jameskarl908
Community Member

Thank you, your post solved my hvac problem  too