Set a time of day (from a drop down or slider), and fire an action at that time?

Hi. Take a look at: Input_datetime initial value with time only (and the discussion around the issue)
This thread is what I finally used to get my “start coffee machine at a customisable time” automation going.

  • create an input_datetime for the time of day (text fields, not drop-down)
  • create a sensor with platform: time_date
  • create an automation that checks if the current time is the same as the input_datetime

E.g. my automation trigger looks like:

platform: template
    value_template: '{{ states.sensor.time.state == (states.input_datetime.coffee_start_time.attributes.timestamp | int | timestamp_custom("%H:%M", False)) }}'

I feel this should be easier, but that’s what it is for now.

As for resetting, you can just reset the value of the input_datetime when the automation/script runs.
I hope that helps :slight_smile: