дћм means 'home, house, building' (usually but not necessarily residential).
домћй is an adverb, not an inflected form of дћм. It implies motion, like English 'homeward'.
дћма is the matching adverb that implies location rather than motion, like English 'at home'.
— Гдљ егћ дћм? — Тђм.
— Гдљ Сђша? — Дћма.
— Кудђ вІ (идёте)? — Домћй.