How to use a Input Datetime as a time trigger for an automation

I’m trying to trigger an automation at a given time, but want to change that time from lovelace. I created a Date/Time Input Helper, input_datetime.drip_start_time. I have that input set to 8am (08:00:00)

This is my automation. It does not work as written.

- id: '1629344801809'
  alias: Drip - Start Drip Script
  description: ''
  trigger:
  - platform: time
    at: '{{ states(''input_datetime.drip_start_time'') | int }}'
  condition:
  - condition: state
    entity_id: input_boolean.irrigation_drip_on
    state: 'on'
  action:
  - service: script.turn_on
    target:
      entity_id: script.drip_irrigation_run
  mode: single

Any idea how to get this to work? Can an automation use a date/time input from lovelace?

Why do you int the datetime.
I’m quite sure it will work if you remove | int

The examples in the documentation show no template is required. Just use the bare entity:

So in your case:

- id: '1629344801809'
  alias: Drip - Start Drip Script
  description: ''
  trigger:
  - platform: time
    at: input_datetime.drip_start_time

You beat me to it!

image

Thanks! I’ll give that a shot.