All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
A slight deviation from the direction of the Qiblah – to the right or to the left – does not affect the validity of the prayer, because the slight deviation does not make a person divert from the direction of the Qiblah.
The Prophet said: “Between the East and the West is a Qiblah.” [Al-Tirmithi and Al-Bukhari classified it as strong]
Sharh al-Muntaha reads: “A slight deviation to the right and to the left is pardoned for the text that has been narrated in this regard, and seeing the Ka’bah itself by Ijtihaad is impossible, so it is not required, so it is replaced by the direction for necessity.” [End of quote]
Ibn Abd al-Barr said in al-Istithkaar:
“Al-Athram said: ‘I asked Ahmad ibn Hanbal about the statement of ‘Umar ‘between the East and West is a Qiblah’ so he said ‘this is in relation to all countries except Makkah at the House [of Allah] for if one diverts from it even if it is a slight diversion, then he has missed the Qiblah, but it is not the same thing for the Qiblah of other countries. Then he said ‘this is the Mashriq (the East) and he pointed with his hand, and this is the West, and he pointed with his hand, and between them is a Qiblah.’ I asked him: ‘Is the prayer of a person who prays between them valid?’ He replied: ‘Yes, but he should strive to be in the middle. Abu Abdullah said: “We as well as the people of Baghdad used to pray while we are facing a bit to the right side [from the Qiblah].”
Based on the above, if your deviation in your room is slight and you do not divert from what is called the direction [of the Qiblah], then your Prayer is valid and there is no harm on you, but it is more appropriate not to divert from it, even if the diversion is slight.
Allah Knows best.