Self hosted MQTT - what are the actual options ?!

For any integration in HA there is are two possible ways it could be configured:

  1. In the UI from the integrations page. In which case the config details are stored on disk in JSON files within the hidden .storage folder in the ha config folder
  2. In yaml in the configuration.yaml file

Which way an integration is configured is mostly up to the integration author. Although they have these rules to follow:

  • Integrations that communicate with devices and/or services are only configured via the UI. In rare cases, we can make an exception.
  • All other integrations are configured via YAML or via the UI.

There are many integrations now which are only configurable in the UI, it is not possible to configure them in yaml. Mqtt is sort of one in that you have to do some of it in the UI. Although if you need TLS, manual Mqtt entities or other advanced Mqtt options then you do those parts in yaml.

Either way the two config options aren’t interchangeable. The code owner must enable and maintain support for one of the two mechanisms for configuration. They can also optionally enable and maintain the other separately.

1 Like