Hi all,
Trying to understand why my condition template returns false in my automation.
But while checking it in the developer window within HA returns true
This is the automation:
- alias: Actual speed send mechanical ventilation
id: '1322'
mode: single
triggers:
- trigger: state
entity_id:
- input_number.bathroom_fan_speed
id: BadkamerFan
- trigger: state
entity_id:
- input_number.toilet_fan_speed
id: ToiletFan
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- ToiletFan
- condition: template
value_template: >-
"{{ ( states('input_number.toilet_fan_speed') | float ) > ( states('input_number.mechanical_fan_idle_speed') | float ) }}"
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.mechanischeventilator
data:
brightness: "{{ states('input_number.toilet_fan_speed') | int }}"
- conditions:
- condition: trigger
id:
- BadkamerFan
- condition: template
value_template: >-
"{{ ( states('input_number.bathroom_fan_speed') | float ) > ( states('input_number.mechanical_fan_idle_speed') | float )
and ( states('input_number.bathroom_fan_speed') | float ) > ( states('input_number.toilet_fan_speed') | float )}}"
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.mechanischeventilator
data:
brightness: "{{ states('input_number.bathroom_fan_speed') | int }}"
default:
- action: light.turn_on
metadata: {}
target:
entity_id: light.mechanischeventilator
data:
brightness: "{{ states('input_number.mechanical_fan_idle_speed') | int }}"
and mainly these 2 template conditions return false while checking the same syntax in developer window returns a true
value_template: >-
"{{ ( states('input_number.toilet_fan_speed') | float ) > ( states('input_number.mechanical_fan_idle_speed') | float ) }}"
- condition: template
value_template: >-
"{{ ( states('input_number.bathroom_fan_speed') | float ) > ( states('input_number.mechanical_fan_idle_speed') | float )
and ( states('input_number.bathroom_fan_speed') | float ) > ( states('input_number.toilet_fan_speed') | float )}}"
Should there be another way of writing those equations?