Invalid config for [automation]: Invalid trigger configuration

Hi guys,
Last few days I’m scratching my head on this error. And can’t figure out at all whats wrong. It comes up once trying to save any automation. This error to my level of understanding is somewhat complex, if someone could help, would be great. Thanks.

Logger: homeassistant.config
Source: config.py:455
First occurred: 14:41:16 (1 occurrences)
Last logged: 14:41:16

Invalid config for [automation]: Invalid trigger configuration. Got OrderedDict([('default_config', {}), ('cloud', {}), ('recorder', OrderedDict([('purge_keep_days', 10)])), ('scene', [OrderedDict([('id', '1602400904200'), ('name', 'Turn off automations when away'), ('entities', OrderedDict([('automation.kids_bed_light', OrderedDict([('friendly_name', 'Kids bed light ON'), ('last_triggered', '2022-08-29T19:29:20.949172+00:00'), ('mode', 'single'), ('current', 0), ('id', '1580245983629'), ('state', 'off')]))])), ('metadata', OrderedDict())]), OrderedDict([('id.... (See /config/configuration.yaml, line 19).

It’s actually quite simple:

Invalid config for [automation]

It implies you recently created/modified an automation that contains invalid information. Have you made any changes to automations recently?

I had to rebuild my VM and restored HA from backup. (I have done before). My network has gone over revamp, so most of devices had to be reconfigured (due to IP address changes). But I have done similar before, and never had error like that. A lot of automations now had to be updated due to device reconfiguration.
I understand that issue is with automation. Problem is with which one? As I can’t decode that error message.

Are you saying this error occurred immediately after restoring a backup? In that case, I would say the backup was corrupted or contained an error that existed when the backup was made.

It’s showing things that don’t belong in configuration.yaml like an automation’s last_triggered value.

I suggest you examine the contents of configuration.yaml and confirm it looks normal. Do the same for automations.yaml. If neither is obviously corrupted, examine each one of the automations, starting with automation.kids_bed_light.

I will check it out. It’s a bit of a nightmare having mountain of automations. As not much has changed. Config file is defo clean.

If you just restored from a known good backup then I would restore back to that known good point again.

Then once you are restored to an error free state start editing the automations one at a time doing config checks between each one.

Stop when you get an error, fix it and go to the next one.

I’m here because I had the same problem.
I opened the automations.yaml in text editor and started taking out automations one by one.
Every time clicking ‘check configuration’ in developer tools-yaml section each time to see if the remaining part of the automations.yaml had the problematic part.
Finally I found it. There were two entries in the automations.yaml file which were not showing up under Settings / ‘Automations & Scenes’.
So I just manually deleted those old automations from the automations.yaml with the text editor and the problem is gone.

By the way, about a month ago I upgraded to pi4 from pi3 so naturally I restored from a backup.
Also, I had to re-pair my zigbee devices. Some zigbee devices are not present now and the problematic automations included some of the missing zigbee devices. However this still is not an explanation to why they were not showing up.

I hope this helps someone with a similar problem.

1 Like

Thank you!

This was my issue also. Removing the “rouge” automation only visible in the yaml-file solved the issue.

So I managed to fix this from backup. Had to do x2 times (not sure why). But issue disappeared.