Suddenly, I have a bunch of Helper template sensors that have a red exclamation (bang) on them. They seem to be correct and the preview result is correct. There is no indication of anything wrong other than the red exclamation. I recreated one from scratch and they both have the red exclamation.
I recently updated the core and I also ran the ‘delete’ orphans action as there were a number of old entities which couldn’t be deleted.
Post the template (correctly-formatted) for an entity that is showing the red exclamation mark — ideally a simple one that isn’t referencing too many things specific to your system.
Interestingly enough this quirk disappeared as quickly as it appeared. This affected a bunch but not all of the template sensors.