HTTP Component Config Error, No Symptoms

I just started playing around with home assistant tonight and I’m already stumped by a configuration error with no symptoms of a real problem outside of this error message:

"The following components and platforms could not be set up: * [http (https://home-assistant.lo/components/http/) Please check your config.

I removed everything under my configuration.yaml file for the http component except for api_password, ssl_certificate, and ssl_key, but the error message doesn’t go away. I checked the log file, but no errors.

I verified that the homeassistant account can read the certs in /etc/letsencrypt. Also, the encryption is working without issue. I can connect to home assistant remotely with a username and password. Why doesnt HA like my config?

Here is my sanitized config (sorry for formatting, 2 spaces before each line except for http:

http:
api_password: extremelysecurepassword
ssl_certificate: /etc/letsencrypt/live/mydomain.duckdns.org/fullchain.pem
ssl_key: /etc/letsencrypt/live/mydomain.duckdns.org/privkey.pem
ip_ban_enabled: True
login_attempts_threshold: 3

All that said, I keep getting an error message about my configuration. How can I effectively troubleshoot this problem?
Any help is appreciated.

Just so you know, you can preserve the formatting of posted code by highlighting it in edit mode and pressing the pre-formatted text button. See image below:

Is it right under your homeassistant: settings and flush left, lined up underneath it?

Because everything looks in order, I’m guessing that it may be a formatting issue; it might be worth it to simple delete the whole section and retype it from scratch, just to make sure a spare space or tab got in by mistake. It does happen a lot, even to experienced users. It’s certainly happened to me.

The only other thing I can think of is to edit your logger so that you get a debug level error reporting on just the http component. This might reveal more information.

You can get instructions on how to do that here:

Thanks so much for your reply. It’s below homeassistant: in my configuration.yaml file, but it’s not nested within or immediately below it.

Here is what the top part of my config looks like, although I sanitized my location, password, etc. Does this look correct to you?

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 93.2939
  longitude: -323.323
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 23
  # metric for Metric, imperial for Imperial
  unit_system: imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Los_Angeles

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

http:
  api_password: supersecretpassword
  ssl_certificate: /etc/letsencrypt/live/mydomain.duckdns.org/fullchain.pem
  ssl_key: /etc/letsencrypt/live/mydomain.duckdns.org/privkey.pem
  ip_ban_enabled: True
  login_attempts_threshold: 3

Is it possible that it’s just a bug and nothing is wrong? Everything is working from what I can see…

Thanks again!

Here’s mine - the only difference I can see is that I have http: right after the homeassistant: section and before any other enables.

homeassistant:
  name: Home
  latitude: 40.658939
  longitude: -74.39030385
  elevation: 52
  unit_system: imperial
  time_zone: America/New_York
  customize: !include customize.yaml

http:
  api_password: !secret http_password
  ssl_certificate: /etc/letsencrypt/live/westofeast.no-ip.org/fullchain.pem
  ssl_key: /etc/letsencrypt/live/westofeast.no-ip.org/privkey.pem
  base_url: westofeast.no-ip.org

Hey not sure if you ever solved this. I just had a similar problem. When I added the below to my http config the front end wouldn’t load.

ip_ban_enabled: True
login_attempts_threshold: 3

When reading the HTTP components page I saw:
_“If you want to apply additional IP filtering, and automatically ban bruteforce attempts, set ip_ban_enabled to True and select number of attempts. After first ban file ip_bans.yaml will be created in the root configuration folder.”

I manually added the ip_bans.yaml file to my main directory and it now works. not sure if it was a fluke but thought I’d pass it along in the hope it helps.