Using Macro

Hello Group,

I have been looking at macros. I think I pretty much understand how to use them. My problem is, I want to make a file just for macros. There is nothing that really explains how to do this. I want to just make a big macro file and then call the macros back.

Thanks,

Ryan

If you mean Jinja2 macros, Home Assistant doesn’t support the concept of global macros.

jinja2 doesnt but home assistant could and its a good idea, one i wish it had. very much like a template but that only executes when called. you could call this from a jinja2 template, automation, etc. so many uses for this which reduces system resource consumption as templates are executing all the time or on a trigger

3 Likes