Is it possible to create a named template that can be reused in multiple different notifications?
I’d like to be able to combine event-specific information such as ’ 2022-12-31 14:05 main power is up’ with state/context information such as “Phase A: 230v, B: 232v, C: 228v, Freq: 50Hz, Generator: OFF” and so on, and then reuse the latter in other notifications, such as scheduled morning status messages
I do this, but inside of Node-Red. I utilize Node-Red for all of my automations, and I format text as I need. I also create sensors in Node-Red and feedback to HA.
I used to do this within automations with HA. If you search for PurpleAir that discussion has some examples of what you want.
Can make that template into a template sensor. Then just reference the state of that sensor in notifications or wherever you need it.
Alternatively if all the places you need that template are in the same yaml file can use yaml anchors. If you don’t know what they are, this blog post does a pretty good job of explaining them in there. Look for the section called node anchors and read around there.
Those are really you’re only two options. There isn’t anyway to simply save a template and then reuse it in other templates thoughout HA.
EDIT: Actually sorry there is one other way I forgot about. Make the template a secret by adding it to secrets.yaml. Then you can reuse it throughout by doing !secret my_notification_template. That’s probably the best way for this particular use case if you’re using the exact same template in various automations.