Builds a Home Assistant
script
that publishes MQTT device discovery through
mqtt.publish.
An example automation that can run the script at startup is shown separately.
Fill the form to generate a script.
Example
Optional automation to run the script when Home Assistant starts or MQTT comes online. Reference only — it is not included in copy or download.