How do I compare date/time from input datetime to current time?

I feel like this should be simple, but I cannot get this automation to work. And I think the time format is the issue. Automation:

- id: anova_cooker_start
  alias: 'Anova Cooker Start'
  trigger:
    platform: template
    value_template: "{{ states('sensor.time_date') == (states.input_datetime.anova_start_time.attributes.timestamp | int | timestamp_custom('%H:%M', False)) }}"
  action:
    service: script.turn_on
    entity_id: script.anova_start
  condition:
    condition: state
    entity_id: input_boolean.anova_scheduled
    state: 'on'

I have played and played but nothing will match up. Closest I got was this (the format matches) but obviously the date and time are wrong:

How do I create an automation with date AND time as a trigger using an input datetime?

This seems to have solved my issue: Help with automation and template to fire when manual datetime is input

2 Likes