Finding automation error

Whenever HA fires up, I have an Invalid Config flagged up for an automation:

Invalid config for [automation]: not a valid value for dictionary value @ data['action'][0]['target']['entity_id']. Got None. (See /config/configuration.yaml, line 57).

I would like to correct this, even though automations seem to be working, as far as I can tell. The issue is the line number is simply the include statement for automations and I have dozens of automations with thousand of lines of code. There is no other hint as to which it is. Is there a means of narrowing this down so that I can fix it?

Easiest way I have found is to use a text / file editor and block comment out several automations at a time and then recheck.

Working your way down to smaller sections at a time until you eventually find the offending automation.

I would normally start by block commenting out 50% then 25% etc to narrow it down quite quickly.