My configuration.yaml is missing entries

Hi, brand new to Home Assistant (just installed it today!) and I’m a little confused about the role of the configuration.yaml file. In case it matters, I’m doing the virutalenv install on Raspbian (RP3B+).

My understanding from reading articles in the “getting started” section is that the configuration.yaml file contains all of the configuration information for every single component that you add to hass. Using the web interface, I added the zha component for my HUSBZB-1 zigbee/zwave usb stick and successfully paired a Xiaomi Aqara door switch. Pairing the switch added 3 “devices” and I wasn’t sure why, so I decided to open up the configuration.yaml file in ~/.homeassistant to investigate. But when I opened the file, the zha component or the door switch are nowhere to be found! I checked the other .yaml files in the directory, and those are all empty. Are configurations created using the web interface stored elsewhere?

Thanks!

Anything you add from the frontend interface is put into the registry and not the config yaml. The frontend doesn’t modify the config yaml.

You will come across components that will only work if you add them to.the config file because they haven’t been setup to use the registry yet.

You just happen to have used components that don’t require any config yaml changes

Yes. Configuration.yaml is only storing the entities/components that you added by editing that file. As a rule, Home-Assistant will never edit (change or add) anything to configuration.yaml.
When you add a component or entity via the frontend, it gets added into a folder called .storage inside the config folder. There’s a core.config_registry, core.entity_registry, and core.device_registry files inside that folder which store that information (and other files storing other HA configuration and state data).
Just like HA doesn’t touch your config file, the files in .storage are not meant for you to edit, only HA (for the most part. You can edit them, but be very careful, as it’s not the normal way to do things)

If you want to edit the configuration of entities added via the front end, use the Customization or Entity Registry editors available through the frontend.
If you just want to see the entities you have, and see their status or attributes, you can open the dev-states page.

I see, I didn’t know about the registry (didn’t see it mentioned in what I read so far). Thank you both for the information!

If you want to be adventurous and are interested in the internals, there are developer docs available for some of these things as well. It’s not at all mandatory that you look at them, but it’s nice to have an idea what’s going on behind the scenes if you’re so inclined.

Thanks for the links, I’m actually curious to learn a bit more about how Home Assistant works “under the hood” so that’s very helpful!

1 Like

I’m a long time openhab user/developer just moving over to hass b/c of openhab’s third party integration issues. When openhab moved over to UI based development they added a json db to the mix (in addition to the text files and device specific config which could be in xml, json, plain-text…). I then had 3 separate places (at least) to configure things just to get a z wave switch working with an understandable name. It was becoming more and more onerous since the configuration tools would overwrite each other if you were not careful. I’m hopeful hass keeps the yaml config as the ultimate truth but allows for the UI changes if folks are unfamiliar w/ text editors. Thanks again for answering this question.