Configuration via config file?

I prefer to have my configuration in a file, since that allows for easy versioning, diffing, and distribution/reinstallation. While some integrations (say, miio) can be configured via the files, others (like airly, unifi, tradfri) can be configured only via the UI. Is that a conscious design decision? Should I file a “functionality missing” bug report, or a feature request?

You can try but the promise that ‘yaml would always be available as a configuration option’ was discarded quite a while ago.


Yaml is still available as a configuration option, but it is up to each developer of an integration to support it and there is no obligation of which config optionthey choose, some have said they will only use config flow option and not YAML

Which you can still do with the GUI integration…

How can you accomplish this with a GUI based integration? I haven’t been able to see these integrations show up in the configuration.yaml file and haven’t found them anywhere else yet. Thanks!

Because they don’t modify the configuration yaml. They are json files right there in the hidden .storage directory in your config directory.

Awesome. I’ll go look at those. Thanks

Ah, so still files, I thought those things were ending up in the database.

Are those files user-editable? Can I generate them based on data kept elsewhere, dump them in place, and have a fresh instance of homeassistant for example pick up my tradfri or unifi?

Only if HA is not running. They are JSON files, that should not be edited while HA is running.

What’s the reason and risk hidden behind the words “only when HA is not running”?

I don’t know. Just relaying the warning that we were all given when they implemented the .storage integration

Thank you. Do you have some links where I could read more about it?

not really.

Thank you, that’s informative, at the very least about the thoughts of the community :slight_smile: