How I can add my mosquitto broker without GUI?

Hi all! I have a broker set up, but to automate the Home Assistant deployment, I’m trying to find a way to set up communication between HA and Mosquitto using yaml files. At the moment, the HA configuration check swears for outdated parameters. What is currently the working way to configure without using the frontend?
Fragment configuration.yaml

mqtt:
  broker: 127.0.0.1
  port: 1883
  username: someuser
  password: somepass

Error:

Invalid config for [mqtt]: The 'broker' option near /var/calculate/homeassistant/configuration.yaml:38 has been removed, please remove it from your configuration for dictionary value @ data['mqtt']. Got {'broker': '127.0.0.1', 'port': 1883, 'username': 'someuser', 'password': somepass}. (See /var/calculate/homeassistant/configuration.yaml, line 38).

There is none (officially).
Your only solution would be to fiddle with /config/.storage/core.config_entries but keep in mind this is unsupported and frowned upon.

[...]
      },
      {
        "entry_id": "a81eb52e3351fc29782cbe9f83d46089",
        "version": 1,
        "domain": "mqtt",
        "title": "configuration.yaml",
        "data": {
          "broker": "mqtt.lan",
          "discovery": true,
[...]

Why don’t you want to use the UI?

Because I want to raise the whole project with automation tools such as ansible

2 Likes

That is no longer possible (and that‘s a loss).

2 Likes