What you are trying to do, should be fairly straightforward using Node-RED.
It sounds as if you have some parts working (e.g. capture temperature and sending it to Node-RED via MQTT). Is it possible for you to post your flow and to explain how the AC is controlled?
You might want to read how to share code on the forum.