Configuration via yaml


I am asking for general configuration help by editing files, for example configuration.yaml

After migrating from Openhab - I am very happy, but the GUI configuration is nice to learn about HA, later it is very uncomfortable.

You can point me to some sources, forum threads, documentation.

I got acquainted with -

But, for example, the configuration of the TRADFRI bridge is trivial, I don’t know how to add my TRADFRI items anymore.

Thanks for the help in advance :slight_smile:

All the best in 2020 !!!

Start here:

If you need more help, you really need to specify what it is you are confused about.


Thank you, but I wrote that I read the documentation - the link you provided describes the gateway configuration - I asked what to do next: D

No you didn’t.

Actually, you didn’t.

Nothing here says “What do I do next?”

OK - if I wrote too general, I am very sorry, I do not want to offend anyone.

I will stay with TRADFI

configuration.yaml for TRADFRI


now how do I save my stuff in a file - switch, light bulb, 220V socket etc.

Reading the documentation, I can’t understand the YAML syntax.

I mean something like this:

After reading the above, I easily set up TRADFRI and understand how to do it.

If I was rude - sorry again. I sometimes use mental shortcuts.

If the hub didn’t get discovered automatically then try going to the configuration->integrations page. then select the plus sign in the bottom right and add the tradfri integration from there.

you should probably remove the entry in your configuration.yaml before you do that.

Then after it’s set up there I believe that all of your devices should be discovered and added automatically.

Why do you think you need to save stuff in a file for those?

You need to forget what you know about OpenHAB. They aren’t the same thing.

You weren’t rude, you just didn’t express yourself clearly.

I like that phrase. :smiley:

I guess I’m still writing incomprehensibly, or I don’t completely understand HA in terms of configuration in files :slight_smile: Or I’m just stupid :frowning:

For Tradfri I define a gateway in configuration.yaml - I understand that.

Then I don’t want to use any automatic device search. I want to save every bulb, socket etc. in the configuration file. Can’t it be done?

In OH I have complete freedom if I want to configure using GUI or in files (I know - I had to forget about OH;)) but somehow I try to understand it. Can’t do it in HA.

In order not to use OH comparisons, I will give an example of a Ubiquiti device - e.g. edge router ER-4 I can configure basic settings using the GUI, further configuration can be carried out using the GUI but it is very time consuming and inconvenient. So I just turned off the www server in the router completely and configured it using CLI via SSH.

In OH, the configuration in the files is very convenient, but I like HA more. Editing files with major configuration changes is much faster than clicking the mouse in the GUI :slight_smile:

That is why I ask such a question :slight_smile:

Usually, in ha, you configure the integration (either gui or yaml) then the devices and entities are automatic. You can normally hide or ignore entities or devices.

I don’t see how or why you need to. The integration should have already brought all your devices into HA. If it did, these devices are now in the .storage directory within your config directory. You can shut down HA, and edit these files (they are just JSON), but do so carefully, and always have backups.

Understand that whether HA uses the configuration yaml or the “.storage” method (configurable from the frontend), is up to the integration developer. If they don’t give you any options for configuring from yaml, then it’s all done in the front end.

Well, for years, everyone bitched about not having any way to configure and add things from the frontend, so the developers set forth on making things easy to add from the frontend. Now we have people bitching about having to configure things from the frontend, with no push from the developers to require both methods to remain intact.

If you want to use HA, you kind of have to accept the options given to you or start writing code to fix it or add functionality.


I am in group 2. But I am a grumpy old b’stard who prefers to configure everything by text. Comes from starting with linux in the 90s.


I was firmly in the camp of “leave my damn text files alone!” But I warmed up to the GUI and found it’s rather nice to be able to add/modify things without a restart of HA or any services.

1 Like

It is the horrid mix of yaml and json that annoys me most.

1 Like

I’m an old school text editor myself.
Q: What’s the best way to program/code?
A: The way that you are best at.

1 Like

Thank you for the discussion and clarification. My post resulted from the 100% belief that doing everything in files is possible and either the documentation for HA is incomplete or I am stupid I can’t find it.

Now I understand everything - thank you :slight_smile:


So habits come from Linux and the configuration of network devices and previous experience with OH.

To be honest I had the same questions when I switched over from openHAB.

But today I’m quite happy with HA’s configuration part.