Automation gives untraceable error

I’ve updated all my automations, merged a few, went from using ‘id’ to ‘alias’, using new techniques such as ‘mode’, etc. Afterwards I’ve moved the automations into multiple files, which in turn are in nested directories. I’ve then added the automation root folder to my configuration.yaml using:

automation: !include_dir_merge_list automations/

They all seem to work, but there are about 50 to 60 of them so I can’t be 100% sure if some of them don’t.

The problem is, I get the following errors in my log:

Logger: homeassistant.config
Source: config.py:415
First occurred: 6:57:27 PM (2 occurrences)
Last logged: 6:57:27 PM

* Invalid config for [automation]: expected dict for dictionary value @ data['action'][0]['data']. Got None extra keys not allowed @ data['action'][0]['message']. Got None. (See ?, line ?).
* Invalid config for [automation]: [action] is an invalid option for [automation]. Check: automation->condition->0->action. (See ?, line ?).

I have no clue how to debug those, since there are too many automations and it’s not giving any clues. Is there a way to enabled additional logging or does anyone have an idea on how to tackle this?

Thanks!

Does not narrow it down much but this:

['action'][0]

means it’s the first action in one of your automations that has a problem.

And it has something to do with not being able to find a ['message']. Maybe you forgot to specify a message for a notification service call?

For the second error you need to look for an automation, where the first condition is an action, probably action is indented too far to the right.

I searched all automations for ‘message’, and found one that wasn’t indented. That fixed the first error, thanks!

1 Like

Yep spot on! Went through all conditions that had an action, and indeed one was incorrectly indented.

Thanks @tom_l and @Burningstone for your very quick help! :smiley:

1 Like