Allow including (user) tags to things (entities, automations, scripts, areas,…). Each one could have more than one (0 to many).
Then, allow to invoke actions for things having a tag, dynamically.
So, you could define automations that enables/disables other automations (for instance) that have a particular tag (at-home). By allowing this functionality, when adding a new automation that should only work when there are people at home, you wouldn’t have to define a (pre)condition in that automation, and also, this new automation will be also managed by the automations managing ‘tagged’ things (without any modification).
Also consider setting (at runtime) the tags that a thing has, by providing new HA functions (entity.set_tag or entity.remove_tag, for instance).