YAML vs JSON config clarification

Hi, I would greatly appreciate if someone could clarify for me the below (in HA v. 0.110.4):

  1. In most of HA documentation there are references to YAML configuration files, for example MQTT docs here

  2. Yet, when in my HA GUI I went to Configuration -> Integrations and added MQTT the only place where I was able to find reference to my MQTT broker is .storage/core.config_entries The file configuration.yaml remains unchanged and there is no new key mqtt present.

Why is that? Does YAML applies only when one configures HA by editing config files? And .storage/core.config_entries JSON file is being used when configuration is done via Web UI ? Does one format has precedence over another?

What will happen if I already have mqtt settings in .storage/core.config_entries and I will add it to configuration.yaml ? which one will take priority over another?

Any pointers to docs explaining the above much appreciated.

Best regards,
Chris

Hi,

From my experience, when you already use one, and configure in the other it creates a new integration.
Each being managed on it’s one (GUI configures in GUI and YAML configures in YAML file).

YAML: For humans
JSON: For the system

Generally speaking, where there’s overlap the YAML is supposed to over-ride the JSON. However, that’s not entirely consistent and the HA log will tell you.