Perplexed by condition in template

I think the following automation (found in my automation.yaml) should not perform the notification, but it does.

  • alias: Test
    platform: time
    minutes: ‘/5’ # match on interval every 5 minutes
    seconds: 00
    condition: template
    value_template: ‘{{ ((500 - 400) | int) >= 3600 }}’
    service: notify.simplepush
    message: “Should not pass condition”

I am missing something for sure. Please help.
Please ignore spacing, it is OK in the .yaml, but I don’t know how to get it to space properly here.

Ignore me,I’ve been up all night!

VDRainer has it sussed below…

1 Like

The condition returns ‘False’. 100 greater or equal.

- alias: Condition test
    - platform: time
      minutes: '/1'
      seconds: 10
    condition: template
    value_template: '{{ ((500 - 400) | int) >= 3600 }}'
    - service: notify.ios_my_phone
        title: "Home Assistant"
        message: "Should not pass condition"

Testing it and getting no notification as expected.

@jaalperin, paste your code between 3 backticks.
paste code here

Thank you anyway. I appreciate the effort to help me.

1 Like

Thank you, VDRainer. You have helped me resolve the problem.

I have been testing my conditions by impatiently triggering the automation myself. I now see that when I do that condions are ignored and the action is always performed. I thought that clicking a “trigger” link would cause the whole automation to be performed (that the trigger would be bypassed, but that conditions would be considered). Not so, it appears. If I allow the automation to run by itself it runs (or doesn’t) properly.

To me there seems to be a problem with terminology. “Trigger” seems to mean “trigger the action” not “trigger the automation”.

Thanks again.

1 Like