  Given a compact metric space $X$ and a local homeomorphism $T:X\to X$
satisfying a local scaling property, we show that the Hausdorff measure on $X$
gives rise to a KMS state on the $C^{*}$-algebra naturally associated to the
pair $(X,T)$ such that the inverse temperature coincides with the Hausdorff
dimension. We prove that the KMS state is unique under some mild hypothesis. We
use our results to describe KMS states on Cuntz algebras, graph algebras, and
$C^{*}$-algebras on fractafolds.
