Turn Ecobee controlled HVAC on and off via automation

How do I instruct an ecobee thermostat to change HVAC modes in an automation. From the reading I’ve done so far, it appears I should be using the state attribute hvac_modes in my entity climate.ecobee but don’t know where to go from there.

I would really appreciate a code snippet of a simple automation

Thanks

You can try something like this. It monitors sensor.outdoor_temperature and when it’s over 25 degrees, it sets the hvac mode to “cool”.

alias: "Switch Ecobee to Cool Mode"
description: "Switch the HVAC mode to cool when outdoor temperature exceeds 25°C."
trigger:
  - platform: numeric_state
    entity_id: sensor.outdoor_temperature
    above: 25
action:
  - service: climate.set_hvac_mode
    target:
      entity_id: climate.ecobee
    data:
      hvac_mode: "cool"
1 Like