Was there ever any precedent set, for a sitting President of the United States to not have resided in the White House during the entirety or parts of his tenure ?
Note : Other than when it was destroyed by fire (1929) or due to war (1812)
While the White House is used as an official residence there is no law that requires him to actually live there. It is provided as a convenience and courtesy to the president so that he does not have to commute or use his own money for a residence. The building also is set up so that the president has full office capabilities and security. Otherwise, the secret service would have to build security into whatever building the president moved into, find locations to staff the guard posts and build in the full communications technology.
President Truman lived in the Blair House for a while because the White House was being renovated.