On the cohomology of local Shimura varieties