#How to automate device entries in HA app?

1 messages · Page 1 of 1 (latest)

earnest cedar
#

hey folks,
i wanted to build a helping python parser which creates from a humangous xml file the correct yaml configurations to have all needed sensors in the mqtt broker.
for my understanding the original idea is to add mqtt device via ui and follow the dialog pages making the configurations - which is fine. now i have like 20ish devices to make so i thought building all the needed lines in python and copy paste them whereever the mqtt broker app needs them should do the trick - but i cannot locate where the app saves its stuff.
i know i could do just my own configuration yaml entries but i would appreciate having it a perfect fit for the app, so as it would have been created by the app itself (also to have it cleanly working in the ui of the app as devices ui etc).
Can someone help me out here? Couldn't come up with an appriopiate category, sorry if i took the wrong one 🙁

BR,

Jonas

sacred sage
#

Out of the box question, are you also building the device posting to the MQTT? If so, you can make that device also send it's "auto discovery" config to HA and it will automatically add itself.

#

How to automate device entries in HA app?

sacred sage
#

You can manually add MQTT sensors (or other domains) to the UI: https://www.home-assistant.io/integrations/sensor.mqtt/
Alternatively, you could also make a Home Assistant script with input fields that post the correct auto discovery topic. Might be bit more work to do it right but would be neatly integrated 🙂

Home Assistant

Instructions on how to integrate MQTT sensors within Home Assistant.