Edit configuration.yaml with Hass.io CLI

Hello there.
I installed Home Assistant on my Asustor Nas using Docker-ce. I can see the configuration.yaml file in the Home Assistant folder in the Docker folder in Nas.
But when I open the Home assistant application and write config / configuratin.yaml in the address line, the script does not open.
How can I open this in the application?

Thank you for your help.

You can’t edit configuration.yaml by going to http://xxx.xxx.xxx.xxx:8123/config/configuration.yaml

You have to check where you mapped /config when creating the docker container.

1 Like

Thank you very much for your reply.

But I couldn’t find how to open the file. With the pictures I show you the location of the file in the NAS.

Thank you in advance for your help.

You just have Home Assistant container. You can’t open it in the application.

Just use Windows Explorer to navigate to path (I guess \192.168.1.24\docker\homeassistant\config) and use a texteditor (notepad, but better notepad++ or vscode) to edit configuration.yaml.

\\192.168.1.24\docker\homeassistant\config

Two backslashes at the start of the address.

PS bloody forum software!

very helpful. Thank you!

A bit late, but check this vscode: Home Assistant Config Helper

Includes completion for Entity IDs, Services, Scenes and Triggers :grinning:

John, thanks for those instructions, as a real newbie, it took some searching to figure out the steps prior to your step 1.

Attach keyboard & monitor to Pi
After boot, hit enter to get to :
homeassistant login: root

This is amazing, was getting Server unexpectedly disconnected. After reading you entry figured out it was an extra tab when adding duck dns. Double check your file before restarting!!

How to identify which is the right one? I have there

  • homeassistant/armv7-hassio-multicast:3
  • homeassistant/armv7-hassio-cli_2020.11.1
  • homeassistant/armv7-hassio-audio:17
  • homeassistant/armv7-hassio-dns:2020.12.0
  • homeassistant/armv7-hassio-supervisor:latest
  • homeassistant/armv7-hassio-observer:2020.10.1

finally someone who doesn’t reply with “read the f… manual” :heart_eyes: :heart_eyes:
THANK YOU!!!

may I just add that the command “login” wouldn’t normally work with the ssh access you get via “Terminal & SSH” plugin: you need to follow these instructions to setup ssh to port 22222 at the operating system level

(I know… this is essentially me adding informations by saying “read the f manual” what a contraddiction :rofl:)

1 Like

THANK YOU THANK YOU THANK YOU!
I have been searching and searching how to fix this exact issue. Thanks so much for posting!
Sorry for all the caps and exclamation points, but I am so excited!!! :grinning:

Great answer! Thank you so much!

(one question: why when typing help in ha cli the option “login” is not listed???)

S

Thank you for posting this! I was looking for “how do I get to the dang shell from the keyboard” because that HA shell is useless. :slight_smile: after typing login, it was a few seconds and one find command to locate the file I needed to edit, add a couple of hashes to the configuration.yaml, and reboot. 5 mins tops to resolve a fat finger issue.

Awesome also helped me to clear the IP of my router from ip_bans.yaml… 1000x thanks for your clear description

  1. login to get out of hassio cli and into bash
  2. docker ps to get a list of containers
  3. note the first 3 characters or so of the container for homeassistant - for me it was 51a
  4. docker exec -it 51a /bin/bash
  5. ls to make sure configuration.yaml is there
  6. vi configuration.yaml to edit the file
  7. edit your mistake
    then - write here default_config:
  8. press esc +
    then
    :wq to save and exit
  9. exit then login to get back to hassio CLI
  10. homeassistant check to make sure the conf is right this time
  11. homeassistant restart

Loads default set of integrations. Do not remove.

default_config:

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

Text to speech

tts:

  • platform: google_translate
    automation: !include automations.yaml
    script: !include scripts.yaml
    scene: !include scenes.yaml

This saved me, but to be more clear:

To save file, hit esc, then type “:wq”. you should see this text at the bottom. then hit enter

Total noob here. Many thanks