Thailand DTV visa and taxation/ tax residency

As per my understanding if you are in thailand for more than 180 days you will be considered tax resident.I am in the same boat i am a dubai golden visa holder but dont find the weather appealing and looking for thailand as an option to be in for about 5 months a year through DTV so as not to trigger the taxation of Thailand.