Time input helper for condition in automation

Hi

I tried to create an automation with a condition where I ask, if the date today is after a date from a created helper (time input helper). The problem is, that this condition is always true, regardless of whether the date is in the past or in the future.

condition: time
after: input_datetime.datumseingabe_ferienende

Can someone help

Best Regards
Stefan

As the documentation states, a time condition only looks at the time:

Note
Note that the time condition only takes the time into account. If a referenced sensor or helper entity contains a timestamp with a date, the date part is fully ignored.

Try a template condition:

{{ today_at() > states('input_datetime.datumseingabe_ferienende') | as_datetime | as_local }}

Thank you very much. It works :slight_smile:

After I posted, I changed now to today_at, so it only checks the date. I hope you got that too.

1 Like