This is one of the things that I miss the most in yaml, a global macro declaration that would allow me to have all my macro’s and reuse them anywhere! This would simplify a lot the code with central logic and reusable.
YAML has anchors and aliases and it’s supported in Home Assistant.
Jinja2 has global macros but it’s not supported in Home Assistant.