Buddhist temples have huge spirit houses though my students report that it's not fundamentally a Buddhist belief. They suggest that it's an ancient tradition rooted in superstition.

spirit house on the grounds of a wat in Khon Kaen

onwards