Is there a good video that explains how to make entries into the configuration.yaml for beginners? All of the youtube videos that I watch are based on old platforms

I use the OS 9.5 which doesn’t correlate with most of the videos I watch.

I know to add Studio Code Server, and for example most of the videos call it another name, so it took me a long time to figure out that the name of the add-on they were saying to make sure I install was now called something else.

Then I can open my configuration.yaml, which has almost nothing in it, except for some basic text that I think comes with every installation.

For example, when I tried to put a camera I have from amcrest into Home Assistant, I followed the instructions at Amcrest - Home Assistant (home-assistant.io)

and all it says to do is to copy and paste some lines into the yaml. So I did that and my Home Assistant wouldn’t work, and I had to reset it to a backup. There was no integration, no add-on, nothing that allowed me to suddenly see my amcrest camera or any entities, and Home Assistant wouldn’t work anymore when i followed the directions at that link exactly as it says.

So obviously I’m missing something. I’ve done alot in Home Assistant, my entire house is automated, but I’ve never had to use the yaml before, I always found workarounds. But there are clearly instances where the yaml is useful and I don’t know how to use it. I need a visual video that will take me through the steps, and not a teacher video who explains how the indents work, but someone who actually discusses the functionality and how, for example, the amcrest yaml at that link is integrated and how it works once I’ve entered it into the yaml. Something that connects the dots for me so I can start using the yaml myself.

It also took me a long time to find the yaml. Most of the videos talk about going to “configuration” but that no longer exists. It is called “Developer” now, and so I spent a long time trying to figure out how to use the settings in the Developer tab since it changed around significantly from when these videos were made and said to go to “Configuration”

Hopefully there are updated videos that explain how to do this in current terms and defenitions?

HA is not documented by youtube, and as you have noted the videos become out of date rapidly.

Instead I suggest asking here and including logs and exactly what you put in configuration.yaml.

Also, before you start, make sure you have the web terminal & ssh addon installed and working so that you can edit your yaml and get your logs, even if HA won’t start.

2 Likes

Thanks. I do have both of them installed. I don’t know how to tell if they are working properly, and I have set up HA as a network in File Explorer in Windows, so I can access all of the files that way if that is what you mean? Like I can see the Custom Components folder and all the files in there, and I can add or delete files.

My question isn’t just about Amcrest though, which is why you were mentioning the logs I think?

I am speaking about how to actually edit the yaml.

I guess my question is, assuming there are no other issues and I get that with the amcrest example there are obviously other things at play hence the logs question, but assuming there are no other issues, the amcrest page makes it seem like the requirements are literally as simple as copy their yaml text which is:

Example configuration.yaml entry

amcrest:

  • host: IP_ADDRESS_CAMERA
    username: YOUR_USERNAME
    password: YOUR_PASSWORD

then go to Studio Code Server – Config – Configuration.yaml and control V on line 12, the line directly beneath the last entry in my yaml currently. Currently my yaml looks like the following, none of which I input manually, it is all there on its own:

<

Loads default set of integrations. Do not remove.

default_config:

Text to speech

tts:

  • platform: google_translate

automation: !include automations.yaml

script: !include scripts.yaml

scene: !include scenes.yaml

Put your code in <> brackets. The forum software does not format it correctly otherwise.

Brackets where? I just edited it and added brackets before and after the code but it didn’t change anything

See here How to help us help you - or How to ask a good question

Thanks. I do have both of them installed. I don’t know how to tell if they are working properly, and I have set up HA as a network in File Explorer in Windows, so I can access all of the files that way if that is what you mean? Like I can see the Custom Components folder and all the files in there, and I can add or delete files.

My question isn’t just about Amcrest though, which is why you were mentioning the logs I think?

I am speaking about how to actually edit the yaml.

I guess my question is, assuming there are no other issues and I get that with the amcrest example there are obviously other things at play hence the logs question, but assuming there are no other issues, the amcrest page makes it seem like the requirements are literally as simple as copy their yaml text which is:

# Example configuration.yaml entry
amcrest:
  - host: IP_ADDRESS_CAMERA
    username: YOUR_USERNAME
    password: YOUR_PASSWORD

then go to Studio Code Server – Config – Configuration.yaml and control V on line 12, the line directly beneath the last entry in my yaml currently. Currently my yaml looks like the following, none of which I input manually, it is all there on its own:


# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate

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

What are the actual entries? I mean you can blank out the password.

Did you restart ha after changing configuration.yaml?

What do your logs say?

This is normal as much of what used to be in configuration.yaml is being done in the configuration UI. My configuration.yaml file a couple of years ago was over a hundred lines long.

I suggest that you read up on yaml file structure. Google “basic yaml”. Yaml is not unique to Home Assistant but it was my first exposure to it.

Warning, my descriptions are just my best guess, and corrections would be most welcome.

Anything that starts on the left column is a component. Everything that follows and is indented are parameters for the component. The indentation is what trips me, and probably most others up.

The order of component placement is irrelevant. You can put the amcrest: component and its parameters before or after the tts: component. It doesn’t matter. This is why most instructions say to put it at the end of the configuration file. You can use any text editor. I also have my config folder mapped to a Windows folder so I can use Notepad++. In Home Assistant I also have the text editor add-on and more recently the Studio Code Server (which I am still learning).

Note- MS Word is not a text editor.

Now, what was your question?

If you need help with the configuration.yaml file then post the whole file with a specific question.

1 Like

I’m not sure what mean by the actual entries?

Here is what I see:

To your other questions, I restart almost religiously except I’m not religious, so I restart agnostically.

Regarding the logs, I have Log Viewer but it doesn’t work for some reason, it just keeps telling me the add-on is not running, please start the add-on first, but when I click Start, nothing happens.

So the reason for my question originally was because I thought there might be an updated video out there that explains the yaml with respect to its relation to HA. I understand the indents, though I don’t know where people get their attributes from because there are many things I’ve made edits to but it was only from google that I learned that I could add these in. For example, below and above as conditions for an air purifier notification. When I added the purifier into Smart Life, and then looked at its entities in HA, nowhere did it say I could specify above and below by just adding them in with an indent and then choosing a value. But after alot of searching on google, I found that I could just type it in, and low and behold it worked. I only added that in by clicking “Code Editor” in the actual automation, which gave me the code for that specific device. But it isn’t included in my config.yaml for example, so I don’t know where that is stored.

Sorry for what might seem like a ramble there, but my point is that I get a general concept of yaml, but I don’t get how it works interconnectedly with HA. Hopefully you can see the gaps in my thinking from this post - I’m missing something clearly, and probably something big - I was hoping to find a video online so I wouldn’t have to ask people on here as it seems like a pretty basic question that I’m probably just overlooking somewhere.

Yes I’ve checked the documents. I didn’t find the explanations that I found regarding YAML and config to explain very much at all - unless I’m looking at the wrong pages. I went through the HA introduction and YAML and the config have very basic information, so I turned to google/youtube.

Well your configuration.yaml is just the default, so you won’t see the amcrest integration until you edit that file and restart HA.

I get what you say about studio code server, but your pasting doesn’t seem to have worked.

As a quick edit, ssh in and type

nano /config/configuration.yaml

Type in the config as per the amcrest docs and then press ctrl-x to save it and exit the nano editor. Restart home assistant

ha core restart

You should then see some new entities in dev-tools states.

Before you roll your eyes and/or laugh, is there a good instruction manual on SSH? In fairness, I haven’t looked that one up yet, as I haven’t had to do it so if the configuration documents are sufficient at explaining how to do it, I’ll find out momentarily. OK, now roll your eyes and laugh.

I think I just figured it out - I went to Windows Explorer and found the config.yaml file in there and made the change in the yaml program I bought from the Microsoft store.

I restarted HA, and it hasn’t crashed on me which is good. Is that all there is to SSH?

I am not exactly sure where the camera would show up in HA now. It isn’t listed as an integration and doesn’t have its own integration or add on or anything from HACS that I can see. Maybe that page is an old page for Amcrest and it doesn’t work anymore?

I learnt more from the GitHub Search link from the Examples page than anywhere else about configuration.yaml and Splitting up the configuration just find ones that have been updated recently.

No eye rolling.

I don’t see anything there. There are alot of things listed there so I just did a control-A and control F and typed in crest, and also looked under Cameras and don’t see anything for amcrest.

The Git pages are very confusing to me. I don’t find anything that I can click to download or that takes me to a page that I can read anything. I’ve clicked and clicked, and it seems to happen with almost every git page I go to. Lol, well I’m really showing my noviceness… er naiveness now!

If it worked, then it should show up under the camera domain. There is no need to use CTRL+F - because the states page has filter boxes, so you can type camera. directly in to the filter box:

OK yeah it is definitely not there.