I’m using a Honeywell T6 Z Wave thermostat tied into HA. The thermostat has an auto-change feature to change from heat-to-cool and vice versa if minimum or maximum temps are hit. But, I can’t change to the auto-change mode from HA. I can only change the mode to heat, cool, or off.
I want HA to switch the thermostat from heat to cool and vice-versa based on the target temp I set on my lovelace card. I want HA to handle this because my fireplace is close to the thermostat. I’ll add a condition to the automation to only go to cool mode if the fireplace is turned off.
I know how to set an automation that would turn the thermostat to cool mode when the temp goes above 72, but that makes my lovelace slider useless. I’d like to build an automation that turns the thermostat to cool mode if the indoor temp is higher than the set temp on my lovelace card and vice-versa to change to heat mode.
When I change the target temperature using the slider it changes the temperature: attribute of the entity climate.honeywell_unknown_type_0011_id_0008_cooling_1
Ideally, I’d have the heat mode kick in if the temp goes 2 degrees below the temperature: attribute and the cool go on if it goes 2 degrees above the temperature: attribute.
You could likely create a sensor that monitors the difference between the ‘current_temperature’ and ‘temperature’ - and then build two separate automations based on the value of this sensor.
trigger:
platform: template
value_template: >
{% set mode = states('climate.honeywell_unknown_type_0011_id_0008_cooling_1') %}
{% set trg = state_attr('climate.honeywell_unknown_type_0011_id_0008_cooling_1', 'temperature')|float %}
{% set cur = states('sensor.honeywell_unknown_type_0011_id_0008_temperature')|float %}
{{ mode == 'heat' and trg <= cur - 2 or mode == 'cool' and trg >= cur + 2 }}
action:
service: climate.set_hvac_mode
entity_id: climate.honeywell_unknown_type_0011_id_0008_cooling_1
data_template:
hvac_mode: >
{% set mode = states('climate.honeywell_unknown_type_0011_id_0008_cooling_1') %}
{{ 'heat' if mode == 'cool' else 'cool' }}
Depending on how your system behaves you may need to increase the delta to more than 2. E.g., when heating, if the current temperature reading goes to 2 or more degrees above the set point before, or even after, the heat turns off, then this implementation would switch it to cooling mode. Then, if the same thing happened when cooling (i.e., temp drops to 2 or more degrees below set point before, or even after, the cooling turns off), it would switch it back to heat mode. Can you say oscillation?
Invalid config for [automation]: [platform] is an invalid option for [automation]. Check: automation->platform. (See /config/configuration.yaml, line 687). Please check the docs at https://home-assistant.io/integrations/automation/
In my configuration.yaml file? I didn’t put anything in that file for this. Here is the entry for my automation.yaml file.
- id: '1571793830052'
alias: Change HVAC Mode to Cool or heat
description: Changes HVAC to cool or heat mode if the temp varies 2 degrees more than the set point and the fireplace
is off
trigger:
platform: template
value_template: >
{% set mode = states('climate.honeywell_unknown_type_0011_id_0008_cooling_1') %}
{% set trg = state_attr('climate.honeywell_unknown_type_0011_id_0008_cooling_1', 'temperature')|float %}
{% set cur = states('sensor.honeywell_unknown_type_0011_id_0008_temperature')|float %}
{{ mode == 'heat' and trg <= cur - 2 or mode == 'cool' and trg >= cur + 2 }}
condition:
- condition: state
entity_id: switch.fireplace
state: 'off'
action:
service: climate.set_hvac_mode
entity_id: climate.honeywell_unknown_type_0011_id_0008_cooling_1
data_template:
hvac_mode: >
{% set mode = states('climate.honeywell_unknown_type_0011_id_0008_cooling_1') %}
{{ 'heat' if mode == 'cool' else 'cool' }}
trigger:
platform: template
value_template: >
{% set mode = states('climate.honeywell_unknown_type_0011_id_0008_cooling_1') %}
{% set trg = state_attr('climate.honeywell_unknown_type_0011_id_0008_cooling_1', 'temperature')|float %}
{% set cur = states('sensor.honeywell_unknown_type_0011_id_0008_temperature')|float %}
{{ mode == 'heat' and trg <= cur - 2 or mode == 'cool' and trg >= cur + 2 }}