it’s more like a general question about debugging than a question for this special error message I get every minute:
2018-12-17 19:46:01 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: UndefinedError: list object has no element 1
How can I debug that properly? Unfortunately no line number of the code or something like that is printed in the log so I find it nearly unpossible to know where the error comes from. Manually searching through all my automations and configurations did not help so far - even while seeing that it has something to do with templates and/or conditions.
Is there kind of a “advanced debug mode” that enables precise logging?
I use packages so I what I did was to remove them and do a restart until I found the offending one. then remove files from within that package, again until I found the offending one.
It is a pain with all those restarts but in case you don’t think of it, removing half at a time is the most efficient way.
Also I had a distinct advantage in that I had made a lot of changes in one package so I was fairly sure where to start looking.
For the record my issue was that I had a template that used an input_text which I had subtlety renamed elsewhere. I am still not exactly sure what the error message was telling me exactly but my error log is now a bit cleaner at startup!
My template condition used the state of a sensor which did not always allow my string split operation on special conditions.
So I just wrapped it with an additional if clause: