all inspection require proper notice (usually 24 hours) according to your state, state statue will overwrite all leases.
emergency repairs are exempted from that, but only fire, major plumbing, or gas leak, can classify as emergency.
landlord can also claim abandonment, but that requires 7 days(depends on your state) display notice.