Invalid config error in automation and unable to find error

I am getting this in my notifications and log:

Logger: homeassistant.config
Source: config.py:457
First occurred: 2:48:00 PM (1 occurrences)
Last logged: 2:48:00 PM
Invalid config for [automation]: expected str for dictionary value @ data[‘condition’][0][‘conditions’][0][‘state’]. Got None. (See /config/configuration.yaml, line 1).

I am stumped on even where to look. Any help is appreciated.
This is the top of my config.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

python_script:

group: !include groups.yaml
script: !include scripts.yaml
homeassistant:
  customize: !include customize.yaml

# Non UI automations
automation manual: !include_dir_merge_list automations/

# Automations I create in the UI
automation ui: !include automations.yaml

And here is my automations.yaml. I have multiple other automation files, so am unsure which one it would be in - am thinking this is the first to be included.
I initially did not have the ‘-’ before the ‘alias:’. It was before the ‘id:’, uncommented. Also, I use those brightness values in multiple places, so was trying to create a variable instead of repeating and having to repeat everytime I want to change (which is infrequent). So the number was not there, and the secret was not hashed out. None of the variants cleared the log error.

#- id: '1615732507925'
- alias: living room control east
  description: bright for cn
  use_blueprint:
    path: kpine/ge_double_tap_auto_dimmer.yaml
    input:
      light: light.living_east
      off_brightness: 18 #!secret LivingEast_low
      on_brightness: 40 #!secret LivingEast_high
      device: f8786d0be608888be241e71e1df0a052
#- id: '1615733423064'
- alias: living room control west
  description: bright for cn west
  use_blueprint:
    path: kpine/ge_double_tap_auto_dimmer.yaml
    input:
      light: light.living_west
      off_brightness: 25 #!secret LivingWest_low      
      on_brightness: 50 #!secret LivingWest_high
      device: a9179a024cf50be9bc46e1ac03baf388

It has nothing to do with which file gets loaded first.

it’s looking at an automation that has the first condition that should have “state:” and the value of “state:” should be a string value. And the error is telling you it didn’t see anything there.

I would first look in the last automation that you made a change to and reverse the change.

next I would start commenting out automation blocks until the error goes away. then that automation is the one with the error.

1 Like

Thanks. I had done some of what you stated with no luck. I went back to look for that needle again and did find it. I was using

off

, not

‘off’

.

1 Like