Hello, I am new to this and don’t fully understand, been stuck on this automation for a few days… Maybe someone can easily point out what I am doing wrong.
I am trying make a better interface for my ecobee, based on input selects and based on another thread I found. I am trying port over and swap out the ecobee’s syntax. So far, I did figure out how to extract the right attributes with value templates. For this example, I am just messing with setting the thermostat fan. The attribute is states.climate.my_ecobee3.attributes.fan. The automation works for changing input_select.hvac_fan_mode_downstairs, but not for states.climate.my_ecobee3.attributes.fan. I don’t understand how states.climate.my_ecobee3.attributes.fan gets changed?
automation.
Sets the downstairs thermostat fan_mode when the hvac_fan_mode input_select is changed
-
alias: ‘Set downstairs thermostat fan_mode based on input_select’
trigger:
platform: state
entity_id: input_select.hvac_fan_mode_downstairs
action:
service: climate.set_fan_mode
entity_id: climate.thermostat_downstairs_cooling_1_2_2
data_template:
fan_mode: >-
{%- if is_state(‘input_select.hvac_fan_mode_downstairs’, ‘Off’) -%}{%- elif is_state('input_select.hvac_fan_mode_downstairs', 'On') -%} On {%- endif -%}
Sets the hvac_fan_mode input_select when the downstairs thermostat fan_mode is manually changed
- alias: ‘Set input_select based on downstairs thermostat fan_mode’
trigger:
platform: state
entity_id: climate.thermostat_downstairs_cooling_1_2_2
condition:
condition: template
value_template: ‘{{ trigger.to_states.climate.my_ecobee3.attributes.fan != trigger.from_states.climate.my_ecobee3.attributes.fan }}’
action:
service: input_select.select_option
entity_id: input_select.hvac_fan_mode_downstairs
data_template:
option: >-
{% if states.climate.my_ecobee3.attributes.fan == ‘on’ %}
on
{%- elif states.climate.my_ecobee3.attributes.fan == ‘off’ %}
Off
{%- endif -%}
input select
hvac_fan_mode_downstairs:
name: ‘Fan Mode’
options:
- ‘Auto’
- ‘On’
initial: Auto
icon: mdi:fan