Automatic mode switch for thermostat

I have a Honeywell Z-Wave thermostat that can be set to heat or cool. I’m trying to figure out how I can make it automatically switch between those two depending on what the temperature is currently?

Like say turn the heater on if the temperature is less than 68, but turn the AC on if it gets over 78? What’s the best way to do that?

You’ll need a temperature sensor, which I assume you have.
I’m also assuming the thermostat is a climate entity, in which case you’ll have to define the preset modes for heating and cooling.

Alternatively, you could just trigger the right devices instead of changing the preset mode.

alias: set heating mode based on temperature
description: ''
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.YOUR_TEMP_SENSOR
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.YOUR_TEMP_SENSOR
            above: '78'
        sequence:
          - service: climate.set_preset_mode
            data:
              preset_mode: cooling
            target:
              entity_id: climate.YOUR_CLIMATE_ENTITY
      - conditions:
          - condition: numeric_state
            entity_id: sensor.YOUR_TEMP_SENSOR
            below: '68'
        sequence:
          - service: climate.set_preset_mode
            data:
              preset_mode: heating
            target:
              entity_id: climate.YOUR_CLIMATE_ENTITY
    default: []

This should work, thanks! Much easier than I was making it out to be

1 Like