Config Check Cryptic Error Message

Trying to check the config results in the following error message:

Invalid config for [automation]: not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 201). Please check the docs at Automation - Home Assistant

configuration.yaml at line 201 shows:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

and since the automations are all in the automation.yaml file I guess the error is in there.

Now what does the error message mean, really? Is there a

condition:
    condition:

missing?

Is there a better means to troubleshoot this than commenting out all automations until the error goes away? yamllint doesn’t show any syntactical errors in automations.yaml.

Best,
Axel

It is your automations file so it might help to post that

The main question was how to further troubleshoot without commenting out each and every automation until the config checker is satisfied.

Having done that I find the following culprit:

- alias: 'Wenn das Fenster wieder zu ist, dreh die Heizung wieder auf'
  trigger:
    platform: state
    entity_id: binary_sensor.door_window_sensor_158d00016571fd
    from: 'on'
    to: 'off'
    for:
      minutes: 5
  condition:
    condition: template
    entity_id: sensor.temperature_158d00022cc550
    value_template: '{{ states.sensor.temperature_158d00022cc550 < 20 }}'
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.danfoss_z_thermostat_014g0013_heating_1
        temperature: 23
    - service: notify.Telegram
      data:
        message: "Badfenster ist zu, Heizung wieder auf 23°C gestellt."

Found it. The value_template: '{{ states.sensor.temperature_158d00022cc550 < 20 }}' was the offending line. It now reads:

  condition:
    # only if outside temp is less than 20°C
    condition: numeric_state
    entity_id: sensor.temperature_158d00022cc550
    value_template: '{{ states.sensor.temperature_158d00022cc550 }}'
    below: 20