Adding support of an air conditionner via mqtt

Hi,
I have a python script controlling my AC via an IR led.
I would like to create an integration in Home assistant to send commands via mqtt to my script (temperature, fan speed,mode…).
Any tips?
Thank you

What type of AC?

ESPHome has an IR component that is discoverable in home assistant.

Thank you very much!
I have a mitsubishi that seems available with this. Very interesting, I have an esp32 that I could use, however I have no wifi available, just a wire connexion so using just the rpi hosting HA would be preferable.

Solved. MQTT HVAC integration does the job!