Invalid Config (Automation)

I also have the same error. The line it pointed to suggested it was an issue with my groups.yaml. I’ll have a look for time patterns in my automations.

I found one automation with the time_pattern entry. I’ve deleted it, but the error is still there.

Would love to kill this thing off. Are there any other suggestions?

What’s the full error you’re getting? See up here for details of the command line config check that you should run.

1 Like

Thanks for your response. I’ve checked through my automations.yaml file and cannot see anything that would cause the error. I also changed my templating to the yaml choice.

First is the notification I receive after running configuration validation:

This is the log:

Looking at the configuration yaml line 18:

Now running core check. No errors produced as far as I can see:

One thing I do notice is that one of the automations is ‘greyed out’. I cannot locate a reference to it in my automations.yaml file though:

It’s all a bit of a mystery.

Can you use a code share site to share your groups.yaml and automations.yaml please - remembering to remove any secrets.

… And the actual log entry instead of the summary.

Thanks, I’ve pasted automation and groups yaml files here.

Thanks, but this is all it says…

Logger: homeassistant.config
Source: config.py:415
First occurred: 5:11:06 PM (3 occurrences)
Last logged: 5:11:06 PM

Invalid config for [automation]: (See /config/configuration.yaml, line 18).

There’s a log file :wink:

home-assistant.log in your config folder

There’s no time pattern trigger, which is what this thread was about. You do have some multi-line templates not in multi-line format, but other than being weird, they’re technically valid.

Click ‘show full homeassistant log’, scroll to 5:11:06.

In ‘Late night entry’ you’ve spelled entity_id incorrectly twice, so that’s two out of the three errors sorted.

Gads… I thought that WAS the log. I ended up here because initially I thought it might have been a time pattern trigger, so I removed that automation.

This is from home-assistant.log

2020-12-17 17:11:06 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 
2020-12-17 17:11:06 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 
2020-12-17 17:11:06 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 

Thanks for the input guys.

OK, fix the 2 errors I found and then run a check configuration and hopefully it will tell us what key is incorrect for the remaining error.

Thanks again. I’ve fixed the errors and ran a check config from with the UI. I still have these in the logs:

2020-12-17 21:10:58 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 
2020-12-17 21:10:58 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 
2020-12-17 21:10:58 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 18). 

What did the check config say?

Hi Marc, still says the same. Also ran ha core check from the terminal and no errors are reported.

I think I’ll take the opportunity to re-do all my automations, delete them all and re-add them in one by one.

Thanks @tom_l - this “binary search” approached worked, and in a few “cut automations.yaml in half & check configuration” iterations I located the offending entity.
(It was an Ikea Tradfri on/off dimmer that change IDs when I removed and re-added as zha entity).

Also saw there was an issue open, but closed as stale.
But anyway, wanted to say thanks and that this topic helped somebody else (me!) 6 months later.

1 Like

Had the same problem for months.
For me the problem was a line of code, in the automations.yaml file
There was just the id of an old automation without anything else. As it is on the picture below.
I just deleted the line and everything was ok

1 Like

The same here! I found the code and removed it so I came here at the end of the thread to share the solution and you already did it :joy:

It would have been so much simpler if I had come here at the end sooner :sweat_smile: