How do I begin to troubleshoot this config-check error?

I’m trying to update to the latest HA, but received errors. I tried to upgrade anyways and, naturally, it broke a lot of integrations I had set up. I’m not sure where to begin with troubleshooting this information that the configuration check addon is giving to me. Can anyone advise me on where to start? It seems like a Python error but I’m not sure.

[18:37:44] INFO: Don't worry, this temporary installation is not overwriting your current one.
[18:37:44] INFO: Installing Home Assistant: latest...
[18:37:44] INFO: Please be patient, this might take a few minutes...
[18:38:20] INFO: Installed Home Assistant 2021.6.6
[18:38:20] INFO: Making a copy of your configuration for checking...
[18:38:20] INFO: Checking your configuration against this version...
[18:40:15] ERROR: The configuration check did not pass!
[18:40:15] ERROR: See the output below for more details.
Testing configuration at /tmp/config
ERROR:homeassistant.helpers.check_config:Unexpected error validating config
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/check_config.py", line 155, in async_check_ha_config_file
    await config_validator.async_validate_config(  # type: ignore
  File "/usr/local/lib/python3.8/site-packages/homeassistant/components/automation/config.py", line 127, in async_validate_config
    await asyncio.gather(
  File "/usr/local/lib/python3.8/site-packages/homeassistant/components/automation/config.py", line 104, in _try_async_validate_config_item
    config = await async_validate_config_item(hass, config, full_config)
  File "/usr/local/lib/python3.8/site-packages/homeassistant/components/automation/config.py", line 72, in async_validate_config_item
    config[CONF_TRIGGER] = await async_validate_trigger_config(
  File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/trigger.py", line 49, in async_validate_trigger_config
    conf = await platform.async_validate_trigger_config(hass, conf)
  File "/usr/local/lib/python3.8/site-packages/homeassistant/components/device_automation/trigger.py", line 21, in async_validate_trigger_config
    return await getattr(platform, "async_validate_trigger_config")(hass, config)
grep: write error: Broken pipe
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Which errors? One thing I just recommend is downgrading to the previous version.

The errors mentioned seem to be “async_validate_config” errors listed in various Python config files. I’m not sure if I should reinstall/upgrade Python specifically, or if something else could be causing the problems, I’m really at a loss of how to move forward to get to the latest HA version.

The current version is working fine, but just to clarify, are you suggesting downgrading one version and then trying to upgrade to the latest?

What type of install? If a Virtual Environment, what version of Python? Did you verify your version is supported?

Its a virtual machine that has been running fine for months now currently on version 2021.3.4. I installed it via the Home Assistant VDI file so its the image that HA supplies with everything all bundled together.

There looks to be an error in your config file. Look at the updates that you’re installing for the “breaking changes” it has listed. Are there any items that are on the list that you use?

When did HA require Python 3.8? That could be the breaking change.

Python 3.7 is deprecated for over 6 months:

It appears I am currently running Python 3.8.7.

And to @Mikefila 's note, I am looking at my config as well as breaking changes, but I don’t see anything obvious that is being broken.

Is there a way to update to a different version rather than the latest? It may be easier to upgrade small revisions at a time and fix things that are broken along the way rather than make a big jump.

1 Like

Which file editor are you using, vs code should highlight any errors in the config. Otherwise post your config file.

I’m using the HA interface editor

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

# Text to speech
tts:
  - platform: google_translate
    base_url: https://readacted

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

homeassistant:
  external_url: https://readacted
  internal_url: http://readacted
  whitelist_external_dirs:
   - '/share'

mqtt:  
  broker: 192.168.0.123 
  port: 1883  
  client_id: home-assistant-1  
  username: # Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate
    base_url: https://readacted

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

homeassistant:
  external_url: https://readacted
  internal_url: http://readacted
  whitelist_external_dirs:
   - '/share'

mqtt:  
  broker: 192.168.X.XXX 
  port: 1883  
  client_id: home-assistant-1  
  username: redacted
  password: readacted 
  
  
sensor:  
  - platform: mqtt  
    state_topic: "bruh/sensornode1"  
    name: "SN1 Motion"  
    value_template: '{{ value_json.motion }}'  

#Sensornode2 - Basement server rack
  - platform: mqtt  
    state_topic: "bruh/sensornode2"  
    name: "SN2 Motion"  
    value_template: '{{ value_json.motion }}'  

twilio:
  account_sid: readacted
  auth_token: readacted

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  ip_ban_enabled: true
  login_attempts_threshold: 10
  
zone:
  - name: Home
    latitude: readacted
    longitude: readacted
    radius: 150
    icon: mdi:account-multiple
    
spotify:
  client_id: readacted
  client_secret: readacted
  
ecovacs:
  username: readacted
  password: readacted
  country: US
  continent: NA
  password: readacted 
  
  
sensor:  
  - platform: mqtt  
    state_topic: "bruh/sensornode1"  
    name: "SN1 Motion"  
    value_template: '{{ value_json.motion }}'  

#Sensornode2 - Basement server rack
  - platform: mqtt  
    state_topic: "bruh/sensornode2"  
    name: "SN2 Motion"  
    value_template: '{{ value_json.motion }}'  

twilio:
  account_sid: readacted
  auth_token: readacted

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  ip_ban_enabled: true
  login_attempts_threshold: 10
  
zone:
  - name: Home
    latitude: readacted
    longitude: readacted
    radius: 150
    icon: mdi:account-multiple
    
spotify:
  client_id: readacted
  client_secret: readacted
  
ecovacs:
  username: readacted
  password: readacted
  country: US
  continent: NA

Is that a type o or are there doubled sections in the beginning mqtt tts etc?

Edit and a big durr on my part, what does the check configuration say?

Does MQTT Broker require a username now? UI think Mosquitto made that a requirement.

and second one has a username & redacted password not in the first one.

Thanks, MQQT isn’t actually used so I guess Im not really worried about it anyways. I tried removing the whole MQQT and sensor/sensornode section and ran the Check Home Assistant Configuration Addon again but continue to get the same errors from the original post.

I have also tried running the Check Home Assistant Configuration Addon against the next version up, 2021.4.0 rather than the latest version, and continue to get the same errors…

The Configuration Validation check says everything looks okay.

Also, apologies, I didn’t get the entire config copied for some reason. Here is the entirety of it:


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

# Text to speech
tts:
  - platform: google_translate
    base_url: redacted

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

homeassistant:
  external_url: redacted
  internal_url: redacted
  whitelist_external_dirs:
   - '/share'

twilio:
  account_sid: redacted
  auth_token: redacted

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  ip_ban_enabled: true
  login_attempts_threshold: 10
  
zone:
  - name: Home
    latitude: redacted
    longitude: redacted
    radius: 150
    icon: mdi:account-multiple
    
spotify:
  client_id: redacted
  client_secret: redacted
  
ecovacs:
  username: redacted
  password: redacted
  country: US
  continent: NA
  
notify:
  - name: NOTIFIER_NAME
    platform: pushover
    api_key: redacted
    user_key: redacted

  - name: twilio_sms
    platform: twilio_sms
    from_number: redacted

lutron_caseta_pro:
    bridges:
      - host: redacted
        mac: redacted
#        switch: [ 3, 4, 6, 7, 8, 9 ]
    
light:
  - platform: group
    name: Outdoor Lights
    entities:
      - light.garage_light
      - light.backyard_light
      - light.front_porch_overhead_light

  - platform: nanoleaf
    host: redacted
    token: redacted

  - platform: group
    name: Office Aux Lights
    entities:
      - light.nanoleaf
      - light.desk_lights
      
  - platform: group      
    name: Indoor Lights
    entities:
      - light.nanoleaf
      - light.desk_lights
      - light.office_main_lights  
      - light.master_bedroom_main_lights
      - light.dining_room_chandelier
      - light.kitchen_main_lights
      - light.living_room_under_thermostat
      - light.hue_lightstrip_plus_1
      
  - platform: group  
    name: Cabinet Lights
    entities:
      - light.hue_lightstrip_plus_1
      - light.hue_lightstrip_plus_1_2
      
rest_command:
  launch_spotify_on_android_tab_bathroom:
    url: redacted
    method: POST
    
  launch_spotify_on_android_tab_kitchen:
    url: redacted
    method: POST

#themes
frontend:
  themes: !include_dir_merge_named themes

For testing, I set the version to 2021.3.4 in the Check Home Assistant Configuration Addon which is the same version I am running. The addon again threw errors. So I’m wondering maybe it is not reliable.

As others said, you have duplicates all over the place "tts, “automation”, …
Clean all of those first.

It has been known to be broken in the distant past. Also, in updating fir newer versions they may have broken it for older ones.

Not in the latest posting

I ended up upgrading and manually fixing some things, we seem to be good here, thank you for all of the help everyone.

1 Like