Invalid config for [automation] after update to 2021.12

Just upgraded to 2021.12 and all seems well. However…

When I click on Check configuration I get Configuration valid, and yet the following error message pops up in the Log:

Logger: homeassistant.config
Source: config.py:464
First occurred: 00:27:11 (2 occurrences)
Last logged: 00:27:12

Invalid config for [automation]: expected int for dictionary value @ data['subtype']. Got None. (See /config/configuration.yaml, line 32).

Line 32 is:

group: !include groups.yaml

Always 2 occurrences. What does this mean?

1 Like

Is line 33 automation: !include automations.yaml?

Your editor starts numbering lines at 1, however home assistant starts counting line numbers at 0. So it will be off by 1 line.

Required data in one of your automation service calls is missing.

Yes it is. Thank you, I didn’t know that.

Hi,

I am also getting the same error. However, I am not able to identify the specific automation that is causing the error. I tried to paste automations.yaml file content into configuration.yaml to see whether the error stated the specific line where the expected string is missing, but log just states the line number where “automation:” is. How did you fix it? Any help, please?

Remove all your automations. Paste back 1/2 your automations. You now know which half the error is in. Paste half of that. Repeat… until you narrow it down. This sort of binary search should narrow it down quickly.

1 Like

Thanks for the suggestiom. Will definitely do that. Anyway, any clue on why this is happening? Everything was fine until latest update.

Beyond an issue with data: somewhere in the automation, no idea sorry.

Hi @tom_l,

After following your advise, I could find the bad automations. I removed them, recreated them, and no errors since then. I couldn’t find the specific field/string that was causing the problem though. That’s not a big deal anyway. Sometimes, mysteries happen. :wink: Thank you!

Hey thanks for your post! At least on my end the issue was with the Hue Dimmer remote RWL020 I use; here’s a blueprint to streamline the process of adding actions back to the Hue Dimmer for December 2021 Home Assistant and beyond:

If this isn’t the issue you’re having, one thing that helped me was to find where subtype occurs in my automations and just comment those parts out. It could also be that those keys just don’t exist in your config, but it’s a good first step. Otherwise, binary search it is :stuck_out_tongue:

1 Like

Wish there would be a better way than doing what @tom_l proposed.
My automations.yaml has >5800 lines.
Manually fiddling with that is in itself a breeding ground for errors.

Would be great, if the parser that is throwing the error would actually point out the actual line that throws him off.

1 Like

I have almost 400 automations in close to 50 files in my automations/ directory. Finding which one is causing an error is really not easy when the error only references the line in configuration.yaml that is including them all.
If it could add the id or the alias, of the failed automation(s) in the error, it would help a lot…

1 Like