The HA extensions https://www.home-assistant.io/docs/configuration/templating/ provides useful info but it doesn’t explicitly detail how domains can be used such as trigger , entity , state and so on - in context sensitive blocks - when using template code in the various supporting yaml code blocks/structures. (as in the example above where trigger.payload is contextual where scoped to the trigger. For example, one can use entity.name in contexts where the template code is operating with an in-scope entity