Can I deduct rent paid while working in another state if my primary address is in another

Do travel work. Primary residence in one state, work in another