Manual Trigger in Automation

Hi guys,

I would like to create an automation. The automation is initially triggered by a button in the dasboard. It should then ask for a time.

So time x should be entered manually. When time x has elapsed, the socket should switch off again. E.g. for a light.

Can anyone tell me if this is possible with simple board centres? I am new to HA so… pls forgive me the question.

Cloud

There is no “dialog box” option of which I’m aware, so what you’re describing likely isn’t possible. What you could do is have an input number helper above your button where you set the time there and then click the button. In the automation you’d use the value of the input number helper as the time to wait before turning the light off again.

You could create a script to activate the switch and have the time to run or switch off etc, by using the script fields and parsing that to the script as when you run a script from the dashboard that has fields it will pop up with a bix for you to fill in the time (in this case) before pressing run.

I am on my phone so won’t attempt to write examples but there is documentation and you tube videos available. I believe it was also detailed in the 2024.4 release.

HTH

Hi. Add your Automation’s to Dashboard

Click on any automation, you’ll see popup.

auto1

Hit Run Action, automation will be executed.

Yes seems like this is exactly what the OP is after:

Instead of asking for a time after you hit a button, why not fill in an input number first and then hit a button to start a timer with the set number of minutes, e.g.

Here is how I set my grill timer - it also includes a spoken message that is played when the timer has run out:

  1. This is what the card looks like:
    image

  2. This is the actual yaml for the card:

entities:
  - entity: input_select.announce_timer
    name: What to say?
  - entity: input_number.igrill_time
    name: iGrill Timer Duration
  - entity: script.igrill_timer_start
    name: Start iGrill Timer
title: "Timer & Announcement Settings "
type: entities
  1. This is the script.igrill_timer_start which is run to set up the timer:
alias: iGrill Timer Start
sequence:
  - data:
      duration: 00:{{ states('input_number.igrill_time') | int }}:00
    target:
      entity_id: timer.igrill
    action: timer.start
mode: single
icon: mdi:clock-start
  1. And this is the trigger that initiates the actions once the timer has run out (actions not provided, but your imagination is the limit):
alias: Announce iGrill Status
description: ""
mode: single
triggers:
  - entity_id: timer.igrill
    to: idle
    trigger: state
conditions: []
actions: