Hello, I created multiple automations to set my thermostat based on the outside temperature. When I click on Execute for each automation, they are completing the actions requested. However, once the conditions are met, the automations are not executing.
I think I would be better off with an IF statement, but I can’t seem to figure that out either. I haven’t taken programming in over 10 years, so that leaves me with understanding what I’m needing but clueless on how to make this.
Would someone be able to either help me figure out why any of these multiple automations are not running when their conditions are met or help me create the correct IF statement.
id: '1591843203331'
alias: Air at 75
description: Sets the air at 75 when it's 82 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)==82|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 75
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- data:
fan_mode: 'on'
entity_id: climate.home
service: climate.set_fan_mode
- id: '1592187904943'
alias: Air at 76
description: Sets the air at 76 when it's 83 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)==83|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 76
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- id: '1592190145589'
alias: Air at 77
description: Sets the air at 77 when it's 84 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)==84|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 77
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- data:
fan_mode: 'on'
entity_id: climate.home
service: climate.set_fan_mode
- id: '1592190826693'
alias: Air at 78
description: Sets the air at 78 when it's 85 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)==85|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 78
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- data:
fan_mode: 'on'
entity_id: climate.home
service: climate.set_fan_mode
- id: '1592191106126'
alias: Air at 79
description: Sets the air at 79 when it's 86 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)==86|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 79
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- data:
fan_mode: 'on'
entity_id: climate.home
service: climate.set_fan_mode
- id: '1592191936289'
alias: Air at 80
description: Sets the air at 80 when it's warmer than 86 outside.
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)>86|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data:
hvac_mode: heat_cool
target_temp_high: 80
target_temp_low: 69
entity_id: climate.home
service: climate.set_temperature
- data:
fan_mode: 'on'
entity_id: climate.home
service: climate.set_fan_mode
- id: '1592192445564'
alias: That Normal Air
description: Resume's the Ecobee Programming
trigger:
- platform: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''))}}'
condition:
- condition: template
value_template: '{{(state_attr(''climate.home'',''current_temperature''|int)<82|int)}}'
- condition: and
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''away'')}}'
- condition: or
conditions:
- condition: template
value_template: '{{(state_attr(''climate.home'',''preset_modes'')!=''sleep'')}}'
action:
- data: {}
service: ecobee.resume_program