Presence Determines State of HVAC

Setup Information:

Raspberry Pi 3
Home Assistant Hass.io
Version 0.73.2
Aeotec Z-Stick Gen5
Nest Generation 2 Thermostat (Upstairs & Main Floor)

I thought that creating an automation that turns off / sets our Nest thermastats to away when both my wife and I are not at home would be relatively easy. It hasn’t been since the log file throws an error about the configuration.

Below is the automation:

- alias: "Away from House - HVACs off"
  trigger:
    - platform: state
      entity_id: device_tracker.123
      from: 'home'
      to: 'not_home'
    - platform: state
      entity_id: device_tracker.456
      from: 'home'
      to: 'not_home'
  action:
    - set_nest_away:
      sequence:
        - service: nest.set_mode
          data:
            home_mode: away

The log indicates that set_nest_away is an invalid option for automation.

Any ideas on where I screwed up?

Thanks for any ideas / suggestions!

See my automation, there are a few ways to accomplish this, but this has worked for me for a year or two now.

https://github.com/SilvrrGIT/HomeAssistant/blob/master/automation/nest.yaml#L38