Need Help with splittet config files: Invalid config for [automation]: template value should be a string for dictionary value

Since a while I am receiving this error:

The log details refer to Line 46 in my configuration.yaml as the cause of error but in this line I only include my switches. I have no idea which automation causes this trouble as there is no reference in the log message.

How can I find the automation that causes this error?

somewhere whithin your swith.yaml file maybe?

But that does not make any sense to me as the Error Log clearly refers to a automation issue. :thinking:

you can’t trust the line numbers.

sometimes they work and other times they don’t. they especially don’t work if they are referencing a line in your configuration.yaml and that file contains !inlcudes.

look in your automations for a template placed within a “data_template” key.

also as an FYI, “data_template:” was deprecated a long while back. Now you just need “data:”.

Thank you for your suggestion but I have already replaced all data_templates with data. It’s just weird that there is no reference to a specific automation in the error log. When I validate my configuration in the UI there is no error. It only appears on startup.

Have you done a search in your entire config using a text editor of some kind for “data_template” (even in the hidden .storage folders) and still found none?

that’s likely because at start up there is something that is missing when trying to render the template so it returns the error. after start-up the template is either never rendered again or whatever was missing has been initialized and is no longer missing.

This is also my only explanation. Thanks for your help.

I solved this issue. I disabled every automation one after another and found the one causing this error. Reason was a typo in a template service call section.

I have same problem.

Invalid config for [automation]: template value should be a string for dictionary value @ data['action'][2]['data_template']. Got None. (See /config/configuration.yaml, line 76).
Invalid config for [automation]: template value should be a string for dictionary value @ data['action'][2]['data']. Got None. (See /config/configuration.yaml, line 76).

Is any other way to find where in automations are errors? I have a lot of them. And disable one by one is very heavy …

Have fun disabling each automation one-by-one and run check configuration afterwards. I actually had a missing character in my template. If you find another solution please post it here.