MQTT configuration problems: "via yaml vs. via integration"

Dear all!

I am in the progress of learning HA and migrating my existing MQTT stuff. I have a bunch of sensors from Tinkerforge nicely publishing messages using their MQTT API.

So far, I found two different ways of integrating my stuff into HA.

  1. Adding something to configuration.yaml
  2. Devices & servicesMQTT+Add MQTT Device

With (1) I added e.g.

mqtt:  
   sensor:
   ...
   device:
      ... 
      manufacturer: "Tinkerforge"

It works.

With (2) I can not add, edit, change the manufacturer. It is just not there on the UI (yet).

Otherwise it works (I experienced some hiccups, probably due to the fact that this is still work in progress.)

So I have two questions

  • Where is the information provided via the MQTT integration user interface actually stored?
  • Can I edit this manually somewhere? Is that a good idea at all?

Thanks you for your help and guidance.
Regards, Uwe

Device information is stored in .storage file, I don’t recommend changing it unless you know JSON and HA’s workflow. If you update the device information, try clearing your cache and refreshing the page and your device will update it’s default names. If you renamed things in the UI already, then it won’t change because you overrode those values and your override values will remain.

Did you mean to say this?

Settings → Devices & Services → Devices → Add Device-> MQTT

Can you tell me what kind of device you created using that menu option?

The reason why I ask is because, on my system, that option does not offer to create MQTT entities like sensor, binary_sensor, lock, cover, light, etc.

It offers integrations like MQTT Eventstream, MQTT Statestream, Manual MQTT Alarm Control Panel, etc and MQTT (which cannot be installed twice).

I had never seen it

Seems to ask for a configuration URL

1 Like

It’s new. It’s basically the UI version of adding MQTT entities to HA. The code owner calls them “sub entities” in the documentation IIRC. This months beta adds a bunch more to the UI.

1 Like

Thank you; I found it now.

It’s in a different menu path than what the OP indicated.

Settings → Devices & Services → Integrations → MQTT → Overflow menu → Add MQTT Device

It would seem like the current implementation is in the same spirit as Template Sensor helper. It allows the user to specify some but not all of the available features (i.e. I don’t see the manufacturer option).

Information is distributed.

Lines in /homeassistant/.storage/core.device_registry for Method 1, containing something like
"manufacturer":"Tinkerforge","model":null,

A LONG Line in /homeassistant/.storage/core.config_entries for Method 2.
Simple JSON containing something like
"hw_version":"1.0","model":"Temperature Bricklet"

Perhaps I add the manufacturer. Perhaps I wait until this gets rectified.

I have edited several of the files in the .storage directory. It’s generally not recommended because a single mistake can prevent Home Assistant from starting. However, if you’re willing to take the risk, be sure to make a copy of any file you intend to modify and ensure Home Assistant is shutdown while you are editing the file(s). It helps if you use a text editor that understands JSON (to minimize JSON syntax errors).

2 Likes