Config, base_url and can't restart

Hi!

Im not smart (I’ve come to terms with that) and I need help. I updated everything a couple a days ago. I’ve installed a motion sensor, ikea via ZHA yesterday. That’s pretty much everything I’ve done the last couple of days. I really tried fixing this myself, because I’m sure its a idiot-question and solution. But I’m stuck…

I tried validating and restarting yesterday and got this.
The problem:

Skärmavbild 2021-02-13 kl. 21.42.31

And I tried this: https://community.home-assistant.io/t/base-url-deprecation-but-unclear-what-to-do-about-it/200377?fbclid=IwAR1BCbl_fbhUNsyFH3nmfag8qUkI8Yh_9_i3igCWf0Ke0nx6-LWzJo6cBU0

I use duckdns and I’m a little unsure of my internal URL. But took local ip adress and: 8123.
I’ve removed the bas url completely from my yaml.file but that just got other log issues.

I get the log above and this when I try restarting HA:

Here is my configuration.yaml (and this is when I removed the base_url)
:


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

# Text to speech
tts:
  - platform: google_translate

#themes
frontend:
 themes: !include_dir_merge_named themes

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

sensor:
  - platform: moon

google:
  client_id: xxxxxx
  client_xsecret: xxxxx

 #http 
 ssl_certificate: /ssl/fullchain.pem
 ssl_key: /ssl/privkey.pem
 
resources:
  - url: /local/community/atomic-calendar-revive/atomic-calendar-revive.js
    type: module

Please the community guidelines, especially point 11 on formatting code properly.
Edit your post with code formatted correctly, otherwise we are not able to help you.

Delete the base_url line. It’s no longer needed.

I have and I did, but as I said. I don’t seem to fix the issues…

What are you trying to do with the resources part?
Doesn’t seem to me to belong where it is but in the frontend: section if it’s part of your frontend.


You still need the http: line above your SSL lines, currently ha is trying to assign them to the Google integration which they have nothing to do with.
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Aldo the indentation needs 2spaces on the SSL lines

2 Likes

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

# Text to speech
tts:
  - platform: google_translate

#themes

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

sensor:
  - platform: moon

google:
  client_id: xxxx
  client_secret: xxxx

#http
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
 
resources:
  - url: /local/community/atomic-calendar-revive/atomic-calendar-revive.js
    type: module

I appreciate you trying to help a hopeless case but this is how I’ve done now. Still get this:

As sam said, the http: is still needed for the SSL part.

The resources: section is part of lovelace and should be under the header lovelace:.

Like this:


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

# Text to speech
tts:
  - platform: google_translate

#themes
frontend:
 themes: !include_dir_merge_named themes

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

sensor:
  - platform: moon

google:
  client_id: xxxxxx
  client_secret: xxxxx

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
 
lovelace:
  resources:
    - url: /local/community/atomic-calendar-revive/atomic-calendar-revive.js
      type: module

Another case of people randomly copying code from an old guide rather than just do it from the actual up-to-date documentation :man_facepalming:

OP, please follow @samnewman86 's advice, and in the future use the homeassistant documentation to configure your installation.

This guy should definitely not be manually adding resources in configuration.yaml and should be using the UI (which HACS will have already done for him as its a …/community/… url)

Copy and paste should be banned :wink:

You are right (as usual :P), didn’t notice that it’s a community resource.

1 Like

Copy and paste is great from the docs, but NOT IF YOU USE A GUIDE FROM 2 YEARS AGO :joy:

True :+1:
There are so many outdated guides and videos.
It’s fine to use these get ideas and a to see how things can come together but really need to check the docs for each integration to see if things have changed in the meantime.

1 Like

Just trying to learn tho.

Indeed - it’s a shame because a lot of people have put a lot of effort into writing guides and making videos, but they go out of date so easily and this is a classic example of the problems it causes.

So OP has found an old guide and put something like

http:
  base_url: helloworld.com
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Gets error message because base_url is deprecated and gets stuck. Still doesn’t look at the documentation, so then deletes the base_url line but also removes the http: line - world begins to collapse around the OP making homeassistant look like it’s ‘too hard to do’.

Whereas, if OP had simply looked at the docs and copied exactly the code in there…

No problem, because that’s exactly what it should be.

Appreciated, and I’m certainly not trying to have a dig at you.

Just trying to highlight the problem that following old guides causes, when the documentation is kept up-to-date and contains all the code you need in a (usually) simple copy and paste format.

1 Like

learning is great, but using the docs will help you learn right

Well, until yesterday everything was going rather good, nothing had been going wrong the two weeks I’ve been at it. I’ve tried using up-to-date guides. And trying to be restricted in using configuration.yaml because Im new and don’t want to mess up. But hey, I’ll get back it and trying to fix this.