Most likely you are suffering from an allergy with nasal fluid that collects after allergy, falling at the back of your throat. This can cause a dry hacking cough for long. Temperature does have a lot to do with it. The A/C air is cold and dry and it can dry up your throat and thus take the moisture away. So keep drinking plenty of water as long as you are in the room. And also follow the advice of the local ENT person. You will be alright.