We have an integration for MQTT where we can configure server’s IP and see autodiscovered devices. But if we need to add MQTT entities we must do it editing YAML and restarting the server. There should be an (optional) UI to do that, something like:
1st dialog: “What kind of MQTT device are you configuring?” -> Box where you can select “light”, “switch”, “climate”, “lock” or whatever.
2nd dialog: A list of parameters (where there are required fields and other are optional) where you can fill the topics, values, etc. A good example of what can be done is the UI of homekit2mqtt.
Also, an easier way could be a simple textbox where you could type the YAML for the entity you are configuring, the same way some lovelace cards configuration work.
And of course, it would be great if you don’t need to restart HA after editing a MQTT entity
MQTT already has a basic separate config panel that lets you publish or subscribe to topis. Being able to set up MQTT switches/sensors/etc from there would be awesome
Although HA has a discovery protocol it is selfishly only into HA. HA does not publish its own devices using HA discovery. Actually same for OpenHAB and it’s homie protocol.
There is really no ‘emerging’ HA discovery protocol and if apps are so paranoid in their one sided adoption there likely never will be.
I’m bored supporting such non reciprocal protocols but I agree a template import could help with basic devices. But it’s not the universal discovery solution we need to simplify and promote MQTT adoption.
I crafted a script that basically takes an enriched configuration just like you would do in configuration.yaml, but pushes it to Homeassistant using autodiscovery.
I’ll brush it up and publish it in case anybody is interested.