Hi all
could you please help me to figure out what’s wrong here? I’m trying to fire up an automation with a model, which is based on a time helper I configure with another automation. This is the code I’d like to use in the Template trigger:
{{ states('input_datetime.timer_scaldasonno') == (as_timestamp(now()) | timestamp_custom('%H:%M')) }}
What I’m trying to do here is to trigger the automation when the current time matches the time I stored in the time helper previously, but can’t figure out what’s wrong here. I was thinking perhaps the comparison is not working because I’m not comparing the same data, but it looks like both are string type, so it should work I guess… I even tried this:
{{ states('input_datetime.timer_scaldasonno') == (as_timestamp(now()) | timestamp_custom('%H:%M:%S')) }}
just to make sure it wasn’t due to the missing Seconds, but it doesn’t work too.
Any idea?