How do I find the issues in my configuratien?

Hi!

I’m getting the following messages in my logs:

Logger: homeassistant.config
Source: config.py:508
First occurred: 16:55:07 (8 occurrences)
Last logged: 16:59:08

    Invalid config for [automation]: must contain at least one of below, above.. Got OrderedDict([('default_config', {}), ('tts', [OrderedDict([('platform', 'google_translate')])]), ('automation', [OrderedDict([('id', 'badkamer_raam_lang_open'), ('alias', 'Badkamer - raam lang open'), ('trigger', [OrderedDict([('platform', 'numeric_state'), ('entity_id', 'sensor.badkamer_sensor_humidity'), ('below', 70), ('for', '00:10:00')])]), ('condition', [OrderedDict([('condition', 'state'), ('entity_id', 'binary_sensor.badkamer_raam'), ('state', 'on')])]), ('action', [OrderedDict([('ser.... (See /config/configuration.yaml, line 7).
    Invalid config for [automation]: expected str for dictionary value @ data['condition'][0]['state']. Got None. (See /config/configuration.yaml, line 7).

“config/configuration.yaml” line 7 doesn’t exist. My configuration.yaml looks like this:

(line numbers added for clarification, not in the actual file)

/01/ # Configure a default setup of Home Assistant (frontend, api, etc)
/02/ default_config:
/03/ 
/04/ # Text to speech
/05/ tts:
/06/   - platform: google_translate
/07/
/08/ automation: !include_dir_merge_list automations/
/09/ binary_sensor: !include binary_sensor.yaml
/10/ device_tracker: !include device_tracker.yaml
...

so I’m guessing the issues are somewhere in the automations.

must contain at least one of below, above suggests an issue with a numeric_state trigger or condition: I’ve checked all 65 of them, but haven’t found any missing an above or below.

so… any suggestions on how to find these issues?

Thanks!

This is the correct assumption, most likely your spacing is off.

this one is telling you that a condition is missing state. Again, it could be present but your spacing is off.

e.g. of good spacing.

- some_field1: some_value
  some_field2: some_value

e.g. of bad spacing

- some_field1: some_value
   some_field2: some_value

In the example of the bottom bad spacing, some_field2 would not be seen.

good tips, thanks!

I’ve got more than 300s state triggers and conditions, and 65 numeric_state triggers and conditions.

I was hoping there would be a way to narrow my search down so I wouldn’t have to check all of them.

I usually use a program to find in files, and I’ll search for condition: numeric_state and then just glance at the spacing as I click through. Takes about 5 minutes or so.

shame, thanks anyways :slight_smile: