When there is an error in a script, automation or template, the error logs tries to be helpful, however, if you use !include
-statements in the configuration, these error messages only reference the line in configuration.yaml where the file is included.
And especially if you use !include_dir_merge_list
or !include_dir_merge_named
this makes it almost impossible to track down exactly which file and entry the error occurs.
Example:
Invalid config for [automation]: Unexpected value for condition: 'None'. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data['condition'][1]. Got None required key not provided @ data['action']. Got None. (See /config/configuration.yaml, line 616).
The referenced line in the error message is just:
automation manual: !include_dir_merge_list automations/
My automations/
dir contains almost 50 files with more than 300 automations, and finding the correct one is not very easy.
It would be really helpful if the error message contained either the id, the alias, or some other sort of way to at least narrrow down exactly which automation (or script, or template-sensor which all have the same issue) the error happens in.