It’s a similar deal in the UK, where not to long ago parliament voted down an attempt to require rented accommodation be fit for human habitation. Apparently that’s too high a demand from landlords.
As an example of this kind of rule from a place that currently has them, the basic coverage of California’s implied warranty of habitability are covered on pp 48-50 of this document: