You mean, you send in your script data to an mqtt topic and you have to manually add the entities into HA via configuration.yaml?
Theres a solution, create a dict with the keys name, identifiers and manufacturer, another dict with the keys name, unique_id, state_topic, device. The first dict is assigned to the device key, do with the rest what you like. Then cast that into a json object.
Then publish your data to the following topic: homeassistant/sensor/[device.name]/[unique_id]/config
Your state data should get published to homeassistant/sensor/[device.name]/[unique_id]