I have a datetime
input that stores the last execution date of a certain automation:
has_date: true
has_time: false
editable: true
year: 2022
month: 10
day: 29
timestamp: 1667019991
The following in a dev tools template evaluates to True
:
{{ today_at('00:00') }}
{{ states('input_datetime.last_run') | as_datetime | as_local }}
{{ today_at('00:00') > states('input_datetime.last_run') | as_datetime | as_local }}
2022-10-30 00:00:00+02:00
2022-10-29 00:00:00+02:00
True
But the same condition in a template in an automation condition evaluates to False
according to traces:
condition: template
value_template: |-
condition: template
value_template: >
{{ today_at('00:00') > states('input_datetime.last_run') | as_datetime | as_local }}
Any hint on what the issue might be?