Needing some help with a custom set triggers

hey all,

i have an overly complicated alarm automation running to help me wake up but its only triggered by a single date and time entity and would like some help customising it

here is a very basic mock-up of what i would like a dashboard page to look like (at least a section on a dashboard)

i would like to have the days layed out with a time dropdown near it for me to custom set the time for the set day, but then i want that custom set time to become a trigger on my automation, so when the set time on the dashboard is triggered it will run the automation, much like a standard date and time trigger but more custom on the dashboard so i don’t have to adjust it in the automation itself

I’m not at all good with any of the manual yaml/coding and always use ui so I’m not keen on templates but I’m not opposed to them if needed, any help is appreciated

It will be less fiddly to set up a Schedule Helper:

or a Local Calendar:

and trigger off that.

To it the way you suggested (more complicated but arguably cleaner front end result), you’ll need seven time-only datetime helpers, an automation that triggers off any of them and conditions to match the day to the alarm.

If you call them Alarm 0 to Alarm 6 (so input_datetime.alarm_0 etc) you can add a pair of conditions to match the day, and to assume 00:xx means no alarm:

conditions:
  - condition: template
    value_template: "{{ now().hour() > 0 }}"
  - condition: template
    value_template: "{{ (now().time()|string)[:5] == states('input_datetime.alarm_' ~ now().isoweekday())[:5] }}"

That second template compares the current time (as hh:mm) to the time in today’s helper.

1 Like

thanks so much for the help since I’m very stupid I’m going to try doing this in steps so i know what I’m doing haha😅, first off I’m creating 7 datetime helpers for each day of the week right? that part sounds pretty simple

– ok so a date and time helper set for each day is done now… im lost heh

No, create just one schedule helper like the first documentation you were pointed to. Play with it.

1 Like

i see thanks

You can create one from the gui, set times, then build an automation using hints from the documentation.

1 Like

ok i think i get it, make a schedule, set something up on a dashboard to set the day/time then have the on state for the schedule trigger the automation, just need to figure out how to get it set up to be adjustable on the dashboard

got it, using the scheduler card i set it to press a button helper and that triggers the automation :slight_smile: