Counties across the state are beginning to stop operating these hotels as shelters and are moving as many as possible into permanent housing. But that’s a big challenge in a state that already has a chronic shortage of affordable housing. The California Housing Partnership estimates the state needs 1.3 million new affordable homes for all the people who need them.