WTH why is it so complicated to wait for an action in automations

A type of automation I use a lot is to let HA do an action automatically, but announce it in the speakers/on my phone and then give me a minute to cancel that action.

For example, when I leave the house, I have an automation to lock the doors and turn on the vacuum. But if I only leave the house briefly to let the dog pee so that I know I will be back soon, I can skip the vacuuming by pressing an action in the notification.

These things are fairly complicated to set up and requires yaml. In the effort to remove the need for yaml, this should be easier to do in the ui. Granted you probably cant cover all use cases, some standard ones (like wait for a actionable notification response) I think could be done easier.

Sounds similar to this:

No, not really.

You don’t need yaml to set that up and it’s a pretty easy automation.

mode: single
triggers:
- trigger: state
  entity_id: person.saltf1sk
  to: 'not_home'
  for:
    minutes: 5
actions:
- action: lock.lock
  target:
    entity_id:
    - lock.front_door
    - lock.back_door
- action: <whatever the vacuum service is>

That’s all doable from the UI. What’s hard about that?

other option is to use a zone instead of the person


mode: single
triggers:
- trigger: state
  entity_id: zone.home
  to: '0'
  for:
    minutes: 5
actions:
- action: lock.lock
  target:
    entity_id:
    - lock.front_door
    - lock.back_door
- action: <whatever the vacuum service is>

Maybe a bad example from my side. But I want to be able to exit the automation when selected from a notification.

Maybe I have an automation that dims my light when I’m in the sofa and the tv is turned on. But I might just want to run the tv in the background when I’m doing else in the sofa. I would then want to be able to get a notification that says “Dimming the lights in one minute. Press to keep lights on” or something like that.

For this use case I think you would need to be doing something like:

- conditions:
    - condition: template
      value_template: "{{ wait.trigger.event.data.action == 'SKIP_DIMMING }}"
    

Maybe the WTH should actually be to have an easier way to set up and handle actionable notifications, when I think about it.