WTH Why is creating an automation based on a timer so hard?

I want to trigger something to happen when my timer runs down. I’ve figured out that I need a Helper of type timer that is kicked off when my first event happens, but when I go to create an event for the timer finishing, I get thrown into YAML in the UI.

Why does the automation UI not know how to handle timers - to give me a drop-down for supported event categories, to allow me to choose ‘timer’ and then provide the supported events for that category and give me a drop-down for the ones that exist. Forcing me to figure out that I have to type in “entity_id: timer.blah” in the event data box without any hints or prompts is very unfriendly and much harder to use than it needs to be.

What is it specifically you are struggling with in the UI? I was able to build an automation based on a timer completing directly from the UI.

The issue is that Active->Idle state change is not the same as the timer finishing. To differentiate between finishing and being cancelled, you have to use an Event trigger and OP seems to be asking for the Event trigger UI to present a drop down list of available event types rather than a blank field.

At least, that’s what I think they are asking for…?

3 Likes

Fair point.

Pausing is a different state, but you are correct, cancelling puts it into the idle state just as finishing does.

Perhaps an attribute that indicates the cause of the “Idle” could be helpful. Or, in addition to the attribute “duration”, there could be an attribute “actual_duration” and if they are different, you know it was ended early.

My goal is to create an automation that is triggered when a timer finishes, so I hit ‘create automation’ and look for ‘timer’ in the immediate list, but nothing there. OK, so I create a blank automation and then look through the set of possible triggers for timer, but again, get nothing:

Presumably timers are often used to trigger events, so wanting to create an automation when one runs down can’t be an uncommon use-case.

OK, so then I figure out that the timer expiring sends an event, so I need to use that event as the trigger for the automation. But when I try to do this, I get the blank screen that @Didgeridrew posted - with a blank text box and no idea what type or event data I need to accomplish the task. Eventually much Googling yields the answer.

So what I really want is a ‘timer.finished’ entry to be available as an automation trigger, and then a drop-down of the known timers for me to choose from.

In addition, some extra help in the form of a drop-down for known event types would be useful, for when ‘manual event’ is the chosen trigger for an automation.

Hope that clarifies things - and thanks for the assistance.

1 Like

Don’t look for timer, look for entity. And check when its state changes to idle.

See my photo above for what it should look like

Thanks for the assistance, but I think you’ve missed my point. I was not looking for advice on how to make it work, but rather I was pointing out one of the annoyances that I think could be fixed to make HA easier to use.

No-one but a veteran would look for an entity first - looking for a timer as a trigger seems far more logical to me.

1 Like

This was your original post. The answer is that the UI does know how to handle timers.

As to the entity comment, I agree that this is confusing. Currently, those helpers in the automation builder are made to help with devices, however, a timer is not a device. On the other hand, everything is an entity, so you can always use the entity trigger.

No you can’t trigger on the state.
As Didgeridrew says it’s not the same thing as the events.

The WTH is useful and is something I think should be addressed since it is “problematic” to do it with events and not very intuitive.
I would even say that if you choose state trigger and timer then it should switch you over to the “new” timer trigger thing.

2 Likes

I think HA should have something very intuitive to handle time/timers and scheduling. Currently I am using scheduler-component and scheduler-card, but even those are not perfect. Setting them up requires a significant effort depending on the number of entities, and the transition from 23:59 to 00:00 is an issue.