Automation Condition to check Context

I would like to have smarter conditions that are associated with the context and easily authored using the UI:
A) I could check whether the automation was triggered by Lovelace UI, hardwired device, or script/automation.
B) I could check if the automation was triggered by a particular user.
C) I could supply a different (or the same) automation entity and if the context.parent_id is associated with that other automation, you could ignore or accept the trigger. I don’t think this can be done in templates, but I assume that internally hass could look up the automation entity associated with a parent context ID.

Other Example Use Cases:

  1. This would allow you to create groups or lists of entities as triggers, then propagate some state change from one of those entities to the other entities in the list, but ignore state changes that were caused by this automation.
  2. You want to create an automation to respond to a state change or event, but only when it’s caused by a particular automation.

Don’t forget to vote for your own feature request.

1 Like

Have you asked in the other forums if it isn’t already possible.
I know there are several posts on using the context values to handle triggers.

Some of these are possible using template conditions (like detecting trigger via UI vs. device), but it’s complex and some of this data like the context’s relation to users and other automation is not possible without database access or python.

I’m aware of this hard-to-use solution, but if you read the feature request again, you’ll see that I’m asking for a UI friendly condition. Also this only solves a subset of case A) and not B or C.