On Freund

Results 95 comments of On Freund

> wait_for_trigger is the right solution here, not templates in triggers. These are not mutually exclusive - the `wait_for_trigger` scenario is the one the benefits most from templates. Let's say...

I think you misunderstood me. My proposal is specifically for event triggers, not all types of triggers. More specifically, it's for the use of templates in the `event_data` and `context`...

And if I understand https://github.com/home-assistant/core/blob/78a69ef2849baf6e0be4e34fdb9beb9bcdba98e8/homeassistant/helpers/script.py#L605 correctly, then `async_attach_trigger` is called right before the wait, which means we can evaluate the template at that point, since all the variables should have...

Trying again - any thoughts following my clarification?

In the same way that a value in `service` -> `data` can be either a simple value or contain templates, I'm suggesting the values in `event_data` and `context` also behave...

You mean if the values change during the wait? That's correct, but I think we can figure out an implementation that evaluates in `handle_event` to account for that scenario.

This is the use case I had in mind. The automation can fire when any person arrives home, and then send an actionable notification (e.g. to turn on the light...

The `wait_for_trigger` is there (after the notify). Not sure what you mean by expanding.

(and specifically, the use of template in `wait_for_trigger` is in the last line of the YAML)