How long have you been away for? They only need to give 7 days notice (for memory) so if you were away for 2 weeks the letter could arrive in the mail and the inspection could also be carried out while you're away and yes, it's totally legal. They don't need to confirm a time with you or have your approval, as long as they have given the notice (in writing, no phone calls necessary) then they are totally within their rights.