Hello, I can not manage to get the syntax right on this for my automation to work.
I have home assistant doing the scheduling for a zwave thermostat. For situational awareness I wanted HA to verify that temps where set correctly and if not to notify me.
In attempt to debug I created a test automation to email me on success and on failure, however traces reads BOTH tests of != and == as false.
If I put the == value template in an if statement in developer tools it tests just fine, so it shouldnt be any issue with variable name/type.
Bellow is my automation, thank you for any help you can provide.
FYI the trigger is just an existing toggle I used, and in the real automation there is multiple different actions that vary by trigger which is why I did not put it into conditions).
alias: 01 - Test
description: ""
trigger:
- platform: conversation
command: Test template
- platform: state
entity_id:
- input_boolean.at_telegraph
to: "on"
id: State
action:
- if:
- condition: trigger
id:
- State
then:
- if:
- condition: or
conditions:
- condition: template
value_template: >-
"{{ state_attr('climate.t6_pro_thermostat_36',
'target_temp_high') !=
states('input_number.ts_mf1_cold') | int }}"
- condition: template
value_template: >-
"{{ state_attr('climate.t6_pro_thermostat_36',
'target_temp_low') != states('input_number.ts_mf1_heat')
| int }}"
then:
- service: notify.1stgen
metadata: {}
data:
message: Test Unseccesfull
title: Thermostat change reads false
- if:
- condition: and
conditions:
- condition: template
value_template: >-
"{{ state_attr('climate.t6_pro_thermostat_36',
'target_temp_high') ==
states('input_number.ts_mf1_cold') | int }}"
- condition: template
value_template: >-
"{{ state_attr('climate.t6_pro_thermostat_36', 'target_temp_low') == states('input_number.ts_mf1_heat') | int }}"
then:
- service: notify.1stgen
metadata: {}
data:
title: Test automation worked scucessfully
message: Thermostat change success
mode: single