Thermostats MQTT Espeasy Mega

Good morning everyone,
I come from a home automation system based on Domoticz and I want to move towards Home Assistant as I think it is more versatile.
The only thing that is stopping me from migrating all my actuators is the thermostats. I made with the 3D printer the plates of the thermostats with an esp8266, a dht22, a display, buttons and relays on board.
The software I used on the esp8266, espeasy Mega, allowed me to make them independent from home automation in case of failure, and allowed me to integrate them natively via mqtt in domoticz.
Now, wanting to move to HA, I find it very difficult to implement. I can read the temperature and humidity without any problems, but I cannot set the temperature.
I state that in Domoticz, the temperature was set with a script that, when the temperature changed, sent a url command to the thermostat.
I was wondering if it was possible to send these commands via mqtt topic. It would be enough for me to replicate the temperature selector by sending the url command for each set value.
On the control tablets that mount “dashticz” I reconstruct the graphics in the case as I did with domoticz.
I’ve searched everywhere to create these selectors with ure commands but find nothing useful.
I thank anyone who can provide me with info or examples to solve this problem.

Thank you all