Tracking down an error when using packages (See ?, line ?)

Hi all

Just checking in to see if anyone has any tips for finding the location of errors (from the logs), where no location or line is provided (likely because it’s in one of my many package files).

I’m sure I’d eventually find the issue with using CTL-F through each file, but I haven’t so far.

Any tips on ways to identify which package (or even which line in a package) could be causing the issue?

Thanks any and all.

Errors rom log:

Logger: homeassistant.config
Source: config.py:454
First occurred: June 11, 2022, 5:30:37 PM (8 occurrences)
Last logged: 12:48:36 PM

Invalid config for [automation]: [to] is an invalid option for [automation]. Check: automation->to. (See ?, line ?).
Invalid config for [automation]: [before] is an invalid option for [automation]. Check: automation->before. (See ?, line ?).

there is no easy way but you might try looking at the last changes you made to an automation that has ‘before’ in it.

it’s probably an indentation error in one of those.

And FYI, it might not be in a package necessarily. It also could be in an included automation file if you have any.

Thanks… I suspect this is an old error rather than a recent one (and I did take a look through the automation yaml).

Wishful thinking I guess… will just need to do the hard yards :slight_smile:

Binary search. Comment out half your automations. Do a config check. You now know which half the error is in (commented half if it passes, uncommented if it does not pass).

Repeat for the half with the error until you narrow it down to the automation(s) at fault.