Using template to fire off actions

Hi!

I have written a long and complex template in order to control my AC. Lots of nestled clauses in order to take everything from outdoor weather to time of day and alarm_status into account. Now, I cannot simply add that template to an automation as it requires me to add triggers and actions. Have I gotten this backwards? Do I need to generate the equivalent of my script in “dummy mode” i.e. picking multiple triggers, conditions and actions?

Could the generic thermostat component help?

Otherwise, perhaps post your template config and someone might be able to make a suggestion