Invalid Config (Automation)

Sometimes after 0.114, I’m getting this message.

The following integrations and platforms could not be set up:
    automation
Please check your config.

The only reference i can see in the log is this

Logger: homeassistant.config
Source: config.py:413
First occurred: 8:03:17 AM (88 occurrences)
Last logged: 7:37:54 PM
Invalid config for [automation]: (See /config/configuration.yaml, line 15). 

This is a snippet of my configuration.yaml


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
config:
api:
wake_on_lan:
logbook:
breaking_changes:
owntracks:
mobile_app:

scene: !include scenes.yaml
sensor: !include sensors.yaml
binary_sensor: !include binary-sensors.yaml
light: !include lights.yaml
automation: !include automations.yaml
switch: !include switches.yaml

I’ve tried including the automations directly into the configuration.yaml file and then hoping to see more detailed where the error is, but i still get the same error.

Divide your automations in half. Cut half of the automations out of the config and save them in a text document. If a config check passes - the problem is in the cut out half.

Paste half of it back and config check again.

If a config check fails, it is in the newly pasted section.

Repeat dividing the problem section in two until you narrow down where the issue is.

Also, run a command line config check. That will provide much more information.

2 Likes

I did not know that.

1 Like

All i get is this

➜  ~ docker exec homeassistant python -m homeassistant --script check_config --config /config
Testing configuration at /config
INFO:homeassistant.util.package:Attempting install of httplib2==0.10.3
➜  ~

That’s not a log entry, it’s a summary to let you know that your log contains one or more of that error. Click the ‘Show homeassistant log’ button and post the actual error.

2020-09-21 19:38:20 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 

That’s all it says

I have turned on debug logging, and still i’m no closer to seeing where the error comes from.

It says there are 88 occurrences, so presumably you have at least 88 things in your automations.yaml that require attention. How many automations do you have?

In fact, it says those 88 occurrences happened throughout the day, so you want to start by looking at the automations that should have triggered during that time period.

There should be more, and the odds are high it’s a time pattern trigger. For some reason invalid values (like seconds: /90) only produces an error at startup, not during a config check.

Have you find a solution?I have same error.

Having the same error, or a similar one, doesn’t necessarily mean the same problem (or solution) :wink:

Check your log file for the error, and share that.

Logger: homeassistant.config
Source: config.py:413
First occurred: 12:11:28 PM (5 occurrences)
Last logged: 1:08:37 PM

Invalid config for [automation]: must be a value between 0 and 59 for dictionary value @ data[‘seconds’]. Got None. (See /config/configuration.yaml, line 13).

Line 13 is automation: !include automations.yaml

Search your configuration for the lines beginning with

seconds:

And any that have a value of /N where N is 60 or higher needs changing.

1 Like

Find it.It was old Automatation but with last updates come the error.
It was this
type: is_off
condition: device
device_id: 4b935bec66a64c60819822a29a6
entity_id: binary_sensor.shenzhen_neo_electronics_co_ltd_door_window_detector_sensor_4
domain: binary_sensor
for:
hours: 0
minutes: 2
seconds: 0

But i cant change the seconds to 0 or to /0…

That’s not it.

You’re looking for a time_pattern trigger.

1 Like

Somewhere you have something like:

- trigger:
  - platform: time_pattern
    seconds: '/300'
1 Like

I want to use it as condition
can i use like this condition: state
entity_id: binary_sensor.shenzhen_neo_electronics_co_ltd_door_window_detector_sensor_4
for: ‘00:05:10’
state: ‘off’
?

You’ve skipped completely out of the conversation we were having and landed us somewhere new. I have literally no idea where I am. How much will it cost me to get home from here?

1 Like

Sorry.And many thanks for finding the error.