Template logic in Automation Condition

I’m trying to use template logic in the condition part of an automation.
To get started, I wanted to enter the simplest condition. Just to get the syntax right.
I’m not doing it in in a configuration file, but in the automation’s GUI.
My problem is that whatever I enter, the action always gets triggered. Which I interpret as the condition being True all the time.
This is the template condition logic, currently in place, using the yaml view:

condition: template
value_template: "{{ '1' == '2' }}"

This should return false, i.m.o. I tried many alternatives, but the action is always triggered.
Can anyone tell me what I’m missing?

How are you testing this?

If you’re pushing Run that runs the actions, skipping the trigger and conditions.

For anything else:

  1. Tell us what you’re doing
  2. Share the YAML of the whole automation
  3. Share the trace
1 Like

Thank you Tinkerer.
I didn’t know that ‘Run’ skipped the condition. That was how I tested indeed.
So that explains the behavior and my erroneous interpretation.
I now wonder how I can easily test the condition as part of the automation. Should I make the automation run every minute? Or would there be a more convenient way to ‘Run’ the automation, but in a way that the condition gets included?

Did you click the link in my post?

You should :wink:

1 Like