I have a fault in one of my automations but the log in HA just tells me the line code of my automation include folder. I have many different automation files and the error doesn’t help me to know which file the fault is in. Is there any other way of tracking this down other than me manually going through each one trying to find the error?
Logger: homeassistant.config
Source: config.py:455
First occurred: 16:05:16 (2 occurrences)
Last logged: 16:05:17
Invalid config for [automation]: Expected HH:MM, HH:MM:SS or Entity ID with domain ‘input_datetime’ or ‘sensor’ @ data[‘at’][0]. Got None. (See /config/configuration.yaml, line 59).
What was the last change you made to your automations?
start there and undo it to see if that fixes it.
Otherwise, you will be looking for an automation that should contain an input_datetime or sensor but doesn’t or it is misconfigured (indentation, spelling,…)
Your answer is very helpful for correcting the bug at hand but as far as the larger issue (so to speak) of debugging not going across .yaml files, it definately should allow same.
I have a huge configuration.yaml that would make well organized purists throw up!
I’ll put in a request to make sure debugging allows error messages to not come from the referencing file but instead from within the file that is referenced whenever possible. I am glad I saw this, it’s a great excust for me to rationalize continuing to keep alot of my stuff in one file LOL…!
It’s really strange, and I don’t know the cause, but a lot of times the checker can actually tell you the file and line number even in packages and included files. But sometimes it doesn’t and you get what you did.
One of your automations is using a Time Trigger whose at option received an invalid value (None). If you are using a competent text editor, it will allow you to search for the string platform: time across all files in your “includes/automations” directory.
Alternately, if you recall creating/modifying an automation with a Time Trigger recently, inspect that one first (essentially that’s what finity suggested).